hellfire45
Active Member
- Joined
- Jun 7, 2014
- Messages
- 464
Hey guys. So I have an automation that processes a lot of manual files. It's admittedly a bad process.
On one file the user keeps submitting the data with one of the worksheet names with a space at the end. They either submit it as "Shipment" or "Shipment " My code as seen below does not handle this issue.
I need coding that will process the sheet with or without the space. I was hoping I would use a wildcard & "*" but I don't think this works.
Also, I saw people suggesting to use
This workbook has multiple worksheets and I wouldn't put it past the user to re-order them. So this doesn't help.
Any suggestions? Talking to them is not an option. Thanks.
On one file the user keeps submitting the data with one of the worksheet names with a space at the end. They either submit it as "Shipment" or "Shipment " My code as seen below does not handle this issue.
Code:
Set source_sheet = Workbooks(strFileName).Worksheets("Shipment")
I need coding that will process the sheet with or without the space. I was hoping I would use a wildcard & "*" but I don't think this works.
Also, I saw people suggesting to use
Code:
.worksheets(1)
Any suggestions? Talking to them is not an option. Thanks.