Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 846
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,953
Default 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   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,939
Default 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   Report Post  
Posted to microsoft.public.excel.programming
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




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Changing the color of PART of a line just_asks Charts and Charting in Excel 4 April 2nd 23 08:10 PM
Macro code to put series name next to individual line in line grap Otani Charts and Charting in Excel 3 February 23rd 10 07:24 PM
Changing a line color when it crosses another benchmark line? JB12 Charts and Charting in Excel 3 December 10th 05 04:48 PM
Macro problem on, Yellowed line - previous line or next line. Ed Excel Programming 7 March 29th 05 09:37 PM
Changing Line in line chart B Dubinsky Charts and Charting in Excel 1 January 21st 05 04:10 AM


All times are GMT +1. The time now is 02:11 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"