Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks a lot. I'm doing the checking whether the workbook
is opened. It's working good. But, if it's opened how can I activate (open) another worksheet. If logFileIsOpened = True Then '< checking working good ' < what should I do here to open another worksheet without reopenning workbook Else '< It's working good Set xlApp = CreateObject("Excel.Application") Set xlBook = xlApp.Workbooks.Open(strFileName) Set xlSheet = xlBook.Worksheets(strRecipeNum) xlSheet.Activate DoCmd.SetWarnings True xlApp.DisplayAlerts = True xlApp.Visible = True xlApp.AskToUpdateLinks = True End If -----Original Message----- Your button is executing Set xlBook = xlApp.Workbooks.Open(strWorkbookName) every time it is pressed. You need to check whether the worbook is already open: if yes, don't open it otherwise open it. . |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
how do I set up the openning type of file | Excel Discussion (Misc queries) | |||
Openning spesific file in Excel | Excel Discussion (Misc queries) | |||
Openning Excel Files takes too long | Excel Discussion (Misc queries) | |||
Openning a new document | Excel Discussion (Misc queries) | |||
Openning an .csv file | Excel Discussion (Misc queries) |