Refer to worksheet
I want to refer to a worksheet that has a certain name. Now I write:
Set rapportWorksheet = "Rapport" That is I want to somehow be able to use this variable later and refer to the worksheet by the variable. That way I only have to change the name of the worksheet once in case I have to do that. Please help me with the syntax. Thanks very much! |
Refer to worksheet
Arne,
Set rapportWorksheet = ThisWorkbook/Activeworkbook/Workbooks("Whatever").Worksheets("Rapport") NickHK "Arne Hegefors" ... I want to refer to a worksheet that has a certain name. Now I write: Set rapportWorksheet = "Rapport" That is I want to somehow be able to use this variable later and refer to the worksheet by the variable. That way I only have to change the name of the worksheet once in case I have to do that. Please help me with the syntax. Thanks very much! |
Refer to worksheet
Set rapportWorksheet = Sheets("Rapport")
HTH Charles Arne Hegefors wrote: I want to refer to a worksheet that has a certain name. Now I write: Set rapportWorksheet = "Rapport" That is I want to somehow be able to use this variable later and refer to the worksheet by the variable. That way I only have to change the name of the worksheet once in case I have to do that. Please help me with the syntax. Thanks very much! |
All times are GMT +1. The time now is 10:30 PM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com