Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help changing one line on a macro
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 |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help changing one line on a macro
Sub change_agent()
shtAgent.Visible = True shtAgent.Select End Sub You don't need the activeworkbook line. -- Regards, Tom Ogilvy "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 |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Help changing one line on a macro
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 |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
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 |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Changing the color of PART of a line | Charts and Charting in Excel | |||
Macro code to put series name next to individual line in line grap | Charts and Charting in Excel | |||
Changing a line color when it crosses another benchmark line? | Charts and Charting in Excel | |||
Macro problem on, Yellowed line - previous line or next line. | Excel Programming | |||
Changing Line in line chart | Charts and Charting in Excel |