Re: Open workbook from code without running macros
- From: "Ian" <ic2@xxxxxxxxxxxxxxxxxx>
- Date: Tue, 23 Oct 2007 18:05:30 GMT
That easy, eh?
Thanks, Bernie.
Ian
"Bernie Deitrick" <deitbe @ consumer dot org> wrote in message
news:OEHpDkZFIHA.4296@xxxxxxxxxxxxxxxxxxxxxxx
Ian,
Turn off events:
Application.EnableEvents = False
Workbooks.Open "C:\Folder\FileName.xls"
Application.EnableEvents = True
HTH,
Bernie
MS Excel MVP
"Ian" <ic2@xxxxxxxxxxxxxxxxxx> wrote in message
news:ZTpTi.28954$DB2.2545@xxxxxxxxxxxxxxxxxxxxxxx
I'm trying to write a routine to update some remote templates by pasting
information from another workbook. The templates are designed to run a
userform to accept input but, for the purposes of the update, I don't
want these to run.
Is there a way to open a template from code in another workbook without
allowing the code in the template to run?
I can see 3 possible options:
1. Stop the code running in the template
2. Allow the template code to run, but automatically actuate the Cancel
button (CommandButton2) on the userform
3. Paste from the workbook to the template without opening the template
I can't find a way to do any of these, nor do I know if they are
possible.
I've tried recording a macro in the hope of working through this, but the
part where I click to disable macros when the template opens doesn't
produce any code.
Any pointers will be welcome
.
- References:
- Prev by Date: Macro to assign cell values as folder name
- Next by Date: Re: Help end the testing tedium please
- Previous by thread: Open workbook from code without running macros
- Next by thread: Border around range working -Border for cells within range not wor
- Index(es):