Drmwvr7266
Board Regular
- Joined
- Apr 7, 2002
- Messages
- 164
I am working on some code that will refer back to a previous worksheet. The problem is not knowing the worksheet's name until I am ready to run the code.
Sheet names start as, for example, 1809-1. Then, each month, as they are added, the name changes to 1809-2, 1809-3, etc.
I have a code that copies information from the previous month's sheet, paste it into the current month's, and rearranges the numbers to give a current balance.
Since I have most of the code working,here's what I am looking for:
Sheets(Range("F3")).select
The name of the sheet that the code has to select is in a range. However, my code hangs up here. The cell (F3) looks as such: 1809-1.
I tried it as "1809-1" but no luck yet. I have tried it with a word, with quotes, without. Running out of ideas, aside from creating a userform that would feed the code the necessary data.
Sheet names start as, for example, 1809-1. Then, each month, as they are added, the name changes to 1809-2, 1809-3, etc.
I have a code that copies information from the previous month's sheet, paste it into the current month's, and rearranges the numbers to give a current balance.
Since I have most of the code working,here's what I am looking for:
Sheets(Range("F3")).select
The name of the sheet that the code has to select is in a range. However, my code hangs up here. The cell (F3) looks as such: 1809-1.
I tried it as "1809-1" but no luck yet. I have tried it with a word, with quotes, without. Running out of ideas, aside from creating a userform that would feed the code the necessary data.