VBA Daily new worksheet

anmorale

New Member
Joined
Jan 23, 2025
Messages
5
Office Version
  1. 365
  2. 2019
Platform
  1. Windows
  2. Mobile
excel vba, my workbook produce a new daily worksheet every day, witch it is ok, my question is, in VBA, how can refer to the new created sheet as a reference, tab name and sheet number changes everyday
 
Screenshot 2025-01-23 170452.png
 
Upvote 0
Modify your existing code so it names the new sheet as the current date?
 
Upvote 0
thank you for your answer, but the problem is that i would like to copy to a new sheet any work order that have a follow-up status but in my code i don't know how to name the sheet that already have today date, everyday i will make a new worksheet, i need something else but not "Sheet1 as a reference where from where to copy
i was thinking something like " sheets("sheetName"). Activate"
 
Upvote 0
thank you for your answer, but the problem is that i would like to copy to a new sheet any work order that have a follow-up status but in my code i don't know how to name the sheet that already have today date, everyday i will make a new worksheet, i need something else but not "Sheet1 as a reference where from where to copy
i was thinking something like " sheets("sheetName"). Activate"
 

Attachments

  • Screenshot 2025-01-23 182241a.png
    Screenshot 2025-01-23 182241a.png
    38.7 KB · Views: 7
Upvote 0
Post your workbook to a download site then post the link here.
 
Upvote 0
Is your sheet with the date always in the same relative position in your workbook? It looks from your image that you may have sheets to the left of the displayed sheet, but if that number changes - and you always have your new sheet situated immediately to the left of the "Master" sheet - you could perhaps use something like this:

VBA Code:
Dim ws As Worksheet
Set ws = Sheets(Sheets.Count - 7)

then you could use the variable "ws" as your sheet reference, like this:

VBA Code:
Set statusCol = ws.Range("E2:E14")
 
Upvote 0
Solution

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top