A
Alex
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. (I'm doing it from MS
Access)
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
open it.
If a user open a spreadsheet in a workbook pressing button
on a form with a proc like below:
........
Set xlBook = xlApp.Workbooks.Open(strWorkbookName)
Set xlSheet = xlBook.Worksheets(strWorksheetName)
xlSheet.Activate
xlApp.Visible = True
.......
The workbook with the strWorksheetName1 is still opened
(visible).
How could the user activate another strWorksheetName2
pressing the button again and without closing and
reopenning the workbook. (There are 100 sheets).
Thanks
..
is opened. It's working good. But, if it's opened how can
I activate (open) another worksheet. (I'm doing it from MS
Access)
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
worbook is already open: if yes, don't open it otherwiseRE:-----Original Message-----
Your button is executing
Set xlBook = xlApp.Workbooks.Open(strWorkbookName)
every time it is pressed. You need to check whether the
open it.
.
..
-----Original Message-----
If a user open a spreadsheet in a workbook pressing button
on a form with a proc like below:
........
Set xlBook = xlApp.Workbooks.Open(strWorkbookName)
Set xlSheet = xlBook.Worksheets(strWorksheetName)
xlSheet.Activate
xlApp.Visible = True
.......
The workbook with the strWorksheetName1 is still opened
(visible).
How could the user activate another strWorksheetName2
pressing the button again and without closing and
reopenning the workbook. (There are 100 sheets).
Thanks
..