Excel sheet as variable – Looking for help
Hi everyone,
I got a program that supposedly have to select a preferred sheet of excel from a workbook for importing in a table.
I got no trouble for the table creation from where to select the tab. Those are looking like the following things:
'ABC Homes$'Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
                                             Â
After selected it is passed to a variable with this;Â Â Â
                                                      Â
store customer to mcust                              Â
                                                         Â
When it is tried to select the sheet with this;Â Â Â Â Â Â Â Â Â Â Â
                                 Â
.Application.Worksheets(mcust).Activate && Select sheet
                                                         Â
OEL Error code 0x8002000b: Invalid index             Â
                                                         Â
Any ideas how to solve this thing? It is found that at the moment of storing value of a number over the variables then I get none error though there is no chance of correlating this sheet number along with names of sheet. It is highly appreciable for your support in advance.
Thank you