I have a program that theoretically should select a chosen excel sheet from a workbook to import into a table.
I have no problem creating a table from which to choose the tab. The data looks exactly like this including the quotes;
'ABC Homes$'
After selected it is passed to a varible with this;
store customer to mcust
When I try to select the sheet with this;
.Application.Worksheets(mcust).Activate && Select sheet
OEL Error code 0x8002000b: Invalid index
Any ideas how to make this work? I found if I store a number value in the variable I receive no error however I have found no way to coorelate the sheet numbers with sheet names. I appreciate it. Thanks.
I have no problem creating a table from which to choose the tab. The data looks exactly like this including the quotes;
'ABC Homes$'
After selected it is passed to a varible with this;
store customer to mcust
When I try to select the sheet with this;
.Application.Worksheets(mcust).Activate && Select sheet
OEL Error code 0x8002000b: Invalid index
Any ideas how to make this work? I found if I store a number value in the variable I receive no error however I have found no way to coorelate the sheet numbers with sheet names. I appreciate it. Thanks.