ipbr21054
Well-known Member
- Joined
- Nov 16, 2010
- Messages
- 5,738
- Office Version
- 2007
- Platform
- Windows
Evening,
I have the code installed below but need advice for the correct way to writ something if i may ask.
The part im stuck with is Set my Range, the sheet is called SOLD ITEMS & the range is C2:C35
Thanks
I have the code installed below but need advice for the correct way to writ something if i may ask.
The part im stuck with is Set my Range, the sheet is called SOLD ITEMS & the range is C2:C35
Thanks
Code:
Private Sub CommandButton1_Click()Dim myData
Dim myStr As String
Dim x As Integer
Dim myRange As Range
Set myRange = Range Sheets("SOLDITEMS")("C2:C35")
myData = myRange.Value
For x = 1 To UBound(myData, 1)
myStr = myStr & myData(x, 1) & vbTab & myData(x, 2) & vbCrLf
Next x
MsgBox myStr
End Sub