LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #13   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 9,101
Default What is the code for the active worksheet?

the lines arre getting wraped. In basic, if instructions is used on more
than one line the continuation character _ (underline) needs to be added to
the end of a line.


Add _ to end of the 1st two lines or make these 3 lines 1 line
-------------------------------------------------------------------------------------

ActiveChart.SetSourceData
Source:=Sheets(MyWorksheet.name).Range("A1:B501"),
PlotBy:=xlColumns

-----------------------------------------------------------------------------------

"Dr Dan" wrote:

It's still getting the same error... here's the latest version I have

Sub Macro5()
'
' Macro5 Macro
' Macro recorded 23/02/2007 by Dan
'
' Keyboard Shortcut: Ctrl+g
'
For Each MyWorksheet In ThisWorkbook.Worksheets

Worksheets(MyWorksheet.Name).Select

Columns("A:B").Select
Charts.Add
ActiveChart.ChartType = xlXYScatterSmoothNoMarkers


ActiveChart.Location Whe=xlLocationAsObject, Name:=MyWorksheet.Name
With ActiveChart.Axes(xlCategory)
.HasMajorGridlines = False
.HasMinorGridlines = False
End With
With ActiveChart.Axes(xlValue)
.HasMajorGridlines = True
.HasMinorGridlines = False
End With
ActiveWindow.Visible = False
Windows("Master data.xls").Activate


Next MyWorksheet
End Sub

 
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
E-mailing the active worksheet GrahamB Excel Worksheet Functions 5 February 21st 07 09:48 PM
name an active worksheet djshides via OfficeKB.com Excel Worksheet Functions 1 September 29th 06 12:17 AM
How to Add Rows From Active Cell with in a XLL Code Sheraz Excel Worksheet Functions 0 August 8th 06 01:17 PM
how can I get the name of the active worksheet? Mark Dvorkin Excel Worksheet Functions 3 November 4th 05 02:46 AM
email active worksheet es Excel Discussion (Misc queries) 2 January 31st 05 02:59 PM


All times are GMT +1. The time now is 04:30 AM.

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

About Us

"It's about Microsoft Excel"