VBA to select a defined range
Neither DataSD nor MMR have been set to any objects.
In addition the syntax is
Set DataSD = Worksheets("Sheet1")
Set MMR = DataSD.Range("A1")
or so
--
HTH
Bob Phillips
"Shawn" wrote in message
...
Thanks in advance to all who help on this site.
I have the below code:
Public Sub MMR()
' Keyboard Shortcut: Ctrl+x
Dim DataSD As Worksheet
Dim MMR As Range
Set MMR = DataSD.Range("MMRrange")
MMR.Select
End Sub
When I Set MMR to = DataSD.Range("MMRrange") the MMRrange refers to a
defined range of cells on the DataSD worksheet. However, I have something
wrong for when I run this program this line gives an error?
--
Thanks
Shawn
|