Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
I'm updating a formatted worksheet every day. I have a macro that
processes, lets the user augment, and then saves that days data into a new worksheet with that days date. I need to reference that worksheet the next business day to error check. I cannot : PREVIOUS DATE IS IN CELL A1 s = range("a1").value worksheets(s).select Thank you for any help/suggestions Chris Cameron |
#3
![]() |
|||
|
|||
![]()
Unfortunately that does not seem to help. Due to manipulation by the user,
I don't know what order the sheets will be shown. The only consistent info I have is that the sheet will be named what day it was worked on. I need my code to reference that variable name and error check. Is there any way for SheetOLD.select to accept OLD as a variable name? |
#4
![]() |
|||
|
|||
![]()
ok here is how i do it.cell a1 has the formula=text(B2,d,mmm,yyyy).I type the
date in cell b2 and the answer is 8,may,2005,so the worksheet tab naming regime has to match the format of the date or visa versa.(ie the tab has to be 8,may,2005)Your original code then works a treat. -- hope this helps Paul "camerons" wrote: Unfortunately that does not seem to help. Due to manipulation by the user, I don't know what order the sheets will be shown. The only consistent info I have is that the sheet will be named what day it was worked on. I need my code to reference that variable name and error check. Is there any way for SheetOLD.select to accept OLD as a variable name? |
#5
![]() |
|||
|
|||
![]()
Sub gotosheet()
'goes to sheet1 in order in vba 'no matter what you name it Sheet1.Select End Sub Sub gotosheet1() 'goes to the first TAB as sorted 'no matter what you name it Sheets(1).Select End Sub -- Don Guillett SalesAid Software "paul" . wrote in message ... ok here is how i do it.cell a1 has the formula=text(B2,d,mmm,yyyy).I type the date in cell b2 and the answer is 8,may,2005,so the worksheet tab naming regime has to match the format of the date or visa versa.(ie the tab has to be 8,may,2005)Your original code then works a treat. -- hope this helps Paul "camerons" wrote: Unfortunately that does not seem to help. Due to manipulation by the user, I don't know what order the sheets will be shown. The only consistent info I have is that the sheet will be named what day it was worked on. I need my code to reference that variable name and error check. Is there any way for SheetOLD.select to accept OLD as a variable name? |
#6
![]() |
|||
|
|||
![]() First, thank you very much for trying to help. I don't think I made myself too clear--my fault. The problem is that the users want to keep a daily record of the report on a seperate tab in the workbook. This means that the last daily sheet saved that I have to check will be sheet 2 today, sheet 3 tommorow, and so on. Thats why I need to get the Sheets command to accept some variable of reference. Unfortunately Sheets(variable name).select does not seem to work in any format. Is this even possible? The VBA project viewer shows the sheets and their names, is there a way to reference the code names as a variable? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Excel 2003 Referencing multiple workbooks via single variable | Excel Worksheet Functions | |||
Summary worksheet referencing multiple worksheets | Excel Worksheet Functions | |||
How to protect and unprotect 30 worksheets in a file every month . | Excel Worksheet Functions | |||
Relative Indirect Formula Referencing? | Excel Worksheet Functions | |||
HELP! How do you--> Lock a set of rows but also link worksheets to | Excel Discussion (Misc queries) |