MarkGorecki
Technical User
How would a newbie (like myself) be able to select the cell range using a cursor, instead of hard coding the cell range, then pass the range on to the code?
For example, my code has:
Dim varRange As Variant
On Error Resume Next
Set varRange = _
Application.InputBox("Select a range of cells:", Type:=8)
If IsObject(varRange) = False Then Exit Sub
MsgBox varRange.Range
Then below I have (created from recording a macro)
ActiveChart.SetSourceData Source:=Sheet("Chart_Data").Range("A1
6"), -
Where ("A1
6") was the range selected in the macro. I would like to use the range selected from the cursor.
For example, my code has:
Dim varRange As Variant
On Error Resume Next
Set varRange = _
Application.InputBox("Select a range of cells:", Type:=8)
If IsObject(varRange) = False Then Exit Sub
MsgBox varRange.Range
Then below I have (created from recording a macro)
ActiveChart.SetSourceData Source:=Sheet("Chart_Data").Range("A1
Where ("A1