Hi All
I have the following code:
but I keep getting the error "Unable to get the select property of the Range Class."
I am needing to reference the last used cell in RowA as LastDeal, as later in the code I have the following:
Thanks in advance
I have the following code:
Code:
Private Sub CmdOk_Click()
Dim LastDeal As Integer
LastDeal = Sheets("Data").Range("A1").End(xlDown).Select
I am needing to reference the last used cell in RowA as LastDeal, as later in the code I have the following:
Code:
Response = MsgBox("Do you want to print the Deal Sheet?", vbYesNo, "Print")
Select Case Response
Case vbYes
Sheets("Deal Sheet").Select
Range("E2").Select
ActiveCell.Value = LastDeal 'Enter the LastDeal Number in cell E2 of the Deal Sheet
ActiveWindow.SelectedSheets.PrintOut 1, 1, copies:=1
Case vbNo
MsgBox "You will need to print out the Deal Sheet for:" & LastDeal, vbExclamation, Warning
End Select
Thanks in advance