wsnyder
Board Regular
- Joined
- Sep 23, 2018
- Messages
- 224
- Office Version
- 365
- Platform
- Windows
Hi all
Using Excel 365.
In my VBA Code, I added a worksheet and gave it a name.
I reviewed the workbook, I see that the worksheet was added and named as expected
I then tried creating a worksheet object based on the new worksheet, but the worksheet object is not being created
The code to add the worksheet object comes immediately after adding the worksheet.
These are all temporary steps to create a report, when all is done, I do not want to save any of these temporary steps, just the final output report.
Thanks,
-w
Using Excel 365.
In my VBA Code, I added a worksheet and gave it a name.
I reviewed the workbook, I see that the worksheet was added and named as expected
I then tried creating a worksheet object based on the new worksheet, but the worksheet object is not being created
The code to add the worksheet object comes immediately after adding the worksheet.
VBA Code:
'Step 1 (New worksheet name is ListDates)
GetNewWorksheet wb:=mywb
'Step 2 (Add a worksheet object based on the newly added worksheet)
Set wsListDates = mywb.Worksheets("ListDates")
These are all temporary steps to create a report, when all is done, I do not want to save any of these temporary steps, just the final output report.
Thanks,
-w