VHS01
Board Regular
- Joined
- Nov 3, 2005
- Messages
- 139
I have a VB.exe that creates new sheets each month in an existing workbook. The first thing I need to do is check the open workbook to be sure it's the corrct one. However after several unsuccessful attempts, I added a MsgBox in the VB.exe to return the Workbook caption. No surprise when it turned up as nothing. Here is the code, what am I doing wrong???
The actual Workbook caption is "MyWorkbook.xls"
xlApp.ActiveWorkbook.Activate
If ActiveWorkbook.Windows(1).Caption <> "MyWorkbook.xls" Then
Thanks
Gary
The actual Workbook caption is "MyWorkbook.xls"
xlApp.ActiveWorkbook.Activate
If ActiveWorkbook.Windows(1).Caption <> "MyWorkbook.xls" Then
Thanks
Gary