Hi!
I'm new to Visual Basic and Macros in Excel, but I've experimented a few hours now.
I'd like to make a graph out of a single column, and display it in the same worksheet as the datasource. This will be repeated for several worksheets.
This is my code (which does not work as I'd like):
/***************************/
Sub Macro6()
'
' Macro6 Macro
' Macro recorded 10.04.02 by student
'
'
Range("B2:B202").Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("1000mm_auto_(2)").Range("B2:B202")
ActiveChart.Location Where:=xlLocationAsObject, Name:="1000mm_auto_(2)"
End Sub
/********************************/
This macro always refers to the same worksheet, but I'd like to do the similar action on different sheets, placing the graphs in the correct sheets.
Also, I'd like to make a scatter diagram: think of a the position of a mouse on the screen. Once each millisecond, the position of the mouse is recorded. Then, after recording posistions in two seconds, I would like to display a scatter diagram of where the mouse has been moving, using the width and height of the screen as x- and y- axis on the scatter diagram. How can I do this? I've got one coloumn of each of the x- and y-positions, and would like to display this in a sensible manner.
Thanks, folks
This message was edited by torbjoen on 2002-04-10 01:27
I'm new to Visual Basic and Macros in Excel, but I've experimented a few hours now.
I'd like to make a graph out of a single column, and display it in the same worksheet as the datasource. This will be repeated for several worksheets.
This is my code (which does not work as I'd like):
/***************************/
Sub Macro6()
'
' Macro6 Macro
' Macro recorded 10.04.02 by student
'
'
Range("B2:B202").Select
Charts.Add
ActiveChart.ChartType = xlColumnClustered
ActiveChart.SetSourceData Source:=Sheets("1000mm_auto_(2)").Range("B2:B202")
ActiveChart.Location Where:=xlLocationAsObject, Name:="1000mm_auto_(2)"
End Sub
/********************************/
This macro always refers to the same worksheet, but I'd like to do the similar action on different sheets, placing the graphs in the correct sheets.
Also, I'd like to make a scatter diagram: think of a the position of a mouse on the screen. Once each millisecond, the position of the mouse is recorded. Then, after recording posistions in two seconds, I would like to display a scatter diagram of where the mouse has been moving, using the width and height of the screen as x- and y- axis on the scatter diagram. How can I do this? I've got one coloumn of each of the x- and y-positions, and would like to display this in a sensible manner.
Thanks, folks
This message was edited by torbjoen on 2002-04-10 01:27