View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
[email protected] acctemp@millenniumbank.com is offline
external usenet poster
 
Posts: 29
Default Macro to Create New Worksheet and Reference Cell in Old Worksheet As Tab Name - "Object Required" Error

Here is the code:

Dim A As String
A = Range("J3").Value
ActiveSheet.Select
ActiveSheet.Copy , Befo=Sheets(1)
ActiveSheet.Select
Active.Sheet.Name = A
Range("F5").Select

The value in J3 is 10-02 (formatted as text using =TEXT(F4, "MM-DD").
It runs fine until the line "Active.Sheet.Name = A" and then stops with
a 424 error "Object Required". Up to this point the new spreadsheet
has been created but the tab name is still a copy of the old one.
It is supposed to use the text in cell J3...

Lastly I would like the cell F5 in the new worksheet to be the current
date.