Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is there a better way .... ?
Message
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00700028
Message ID:
00701210
Views:
17
>>>>Whether /import .... XL8 SHEET sheet_name/ does not do what you need?
>>>>Additionally you could use Excel Automation to gather all Sheet Names and then process them as needed. Like:
>>>>ObjExcel= CREATEOBJECT("Excel.Application")
>>>>with ObjExcel
>>>>.Workbooks.Open("c:\book1.xls")
>>>>for ia=1 to .Worksheets.count
>>>>?.Worksheets(ia).NAme
>>>>.....
>>>
>>>Thanks - I'll have to use the automation even though it gets me back to my original problem of not wanting the auto_open macro to fire when opening the workbook with automation .
>>>
>>>Cheers,
>>>Jamie
>>
>>Jamie,
>>
>>I am confused. AFAIK, auto_open macro does not fire while Automation. It works 'automatically' upon open document manually only. What kind of auto_open macro do you have?
>
>Sorry - I have been meaning the workbook_open macro - not auto_open. The workbook_open macro definitely fires during automation. I am wanting to get certain sheet data out without it firing.

It does not matter, workbook_open or auto_open, for me they never fire in Automation. It would be useful to understand what is 'special' in your workbook. I would appreciate if you create a sample to reproduce the behaviour and send it to me.

Anyway this may help you:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/modcore/html/deconWorkingWithDocumentsThatContainStartupCode.asp
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform