View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Brad Brad is offline
external usenet poster
 
Posts: 846
Default Help changing one line on a macro

Thanks to both of you. I'm getting it

"Jim Thomlinson" wrote:

Refering to the objects directly takes a bit of getting used to...

Sub change_agent()
shtAgent.Visible = True
shtAgent.Select
End Sub
--
HTH...

Jim Thomlinson


"Brad" wrote:

In VBE I have change the properties of name of the
sheetxx (Agent_information)
to
shtAgent (Agent_information)

and I would like to change the following Macro

Sub change_agent()
Sheets("Agent_information").Visible = True
ActiveWorkbook.Worksheets("Agent_information").Sel ect
End Sub

to

Sub change_agent()
shtAgent.Visible = True
ActiveWorkbook.shtAgent.Name.Select
End Sub

If have tried several different command for the
Activeworkbook..... line

But none have worked - what is the correct syntax?

Thanks