devanrose33
New Member
- Joined
- Dec 8, 2015
- Messages
- 6
Hi,
I've created a Microsoft Word (2010) VBA code that references an Excel workbook. You would have the Excel workbook open prior to running the Word macro. Basically, the Word document deletes certain paragraphs based on information in the excel document. I have this macro running perfectly on my computer. I've sent it to my team today for testing and a team member was receiving the "subscript out of range" message.
When I ran the debugger on his Microsoft Word it was highlighting where I named the Microsoft Excel Workbook...
Dim Excel As Object
Dim Tool As Object
Set Excel = GetObject(, "Excel.Application")
If Err Then
bstartApp = True
Set Excel = CreateObject("Excel.Application")
End If
With Excel
Set Tool = .Workbooks("VB_Combined_Quoting_Tool_DUMMY")
Any ideas as to why the macro would work fine on my computer but not on another?
Thanks!
I've created a Microsoft Word (2010) VBA code that references an Excel workbook. You would have the Excel workbook open prior to running the Word macro. Basically, the Word document deletes certain paragraphs based on information in the excel document. I have this macro running perfectly on my computer. I've sent it to my team today for testing and a team member was receiving the "subscript out of range" message.
When I ran the debugger on his Microsoft Word it was highlighting where I named the Microsoft Excel Workbook...
Dim Excel As Object
Dim Tool As Object
Set Excel = GetObject(, "Excel.Application")
If Err Then
bstartApp = True
Set Excel = CreateObject("Excel.Application")
End If
With Excel
Set Tool = .Workbooks("VB_Combined_Quoting_Tool_DUMMY")
Any ideas as to why the macro would work fine on my computer but not on another?
Thanks!