R
Ron.Winkley
That was nicely resolved as noted, but:
Example, one of my macros starts like this:
===========================
Sub MainLogFindLastEntry()
'
' MainLogFindLastEntry Macro
' Macro recorded 29 05 2006 by Consultant
'
' Keyboard Shortcut: Ctrl+Shift+L
'
Sheets("Log").Select
===========================
now that this macro is called by a button, I have discovered the
following:
1. if no worksheets are open the macro button will find a and open the
correct workbook and sheet [brilliant!]
2. if other sheet(s), workbook(s) are open but not the correct
workbook, the macro crashes . . .
Can I include in the macro the name of the excel file that needs to be
opened, to fix the above problem [2] ?
Please can you tell me, what is the macro command / syntax to do this?
Thanks,
RonW.
Example, one of my macros starts like this:
===========================
Sub MainLogFindLastEntry()
'
' MainLogFindLastEntry Macro
' Macro recorded 29 05 2006 by Consultant
'
' Keyboard Shortcut: Ctrl+Shift+L
'
Sheets("Log").Select
===========================
now that this macro is called by a button, I have discovered the
following:
1. if no worksheets are open the macro button will find a and open the
correct workbook and sheet [brilliant!]
2. if other sheet(s), workbook(s) are open but not the correct
workbook, the macro crashes . . .
Can I include in the macro the name of the excel file that needs to be
opened, to fix the above problem [2] ?
Please can you tell me, what is the macro command / syntax to do this?
Thanks,
RonW.