Quote:
|
Originally Posted by JerryDal
Has anyone had this type of problem where Excel VBA works perfectly on your own PC but when running on another PC (laptop) with the same version of Excel, code similar to the following refuses to obey?
|
I have had these type of problems. I would:
#1 make sure the Macro Security is set to Allow Macros Medium or Low setting. 'Tools->Macro->Security'
#2 you should not have to specify the "Application" object it is assumed since you are running the MS Excel App.
#3 While in the Debug Mode Test the command in the immediate window. for example this typed in the immediate window
?Workbooks("nameofWorkbook.xls").name will return an error or the name of the workbook if it is open in Excel and the command works.
#4 Use the workbook name with the same case as the file name. may be case sensitive.
#5 Dim the variable as a "String" Data type:
Dim workingWkBook as String
#6 re-install excel or MS Office profile, if all else fails to make sure
VB components are installed.