KiwiGrue
New Member
- Joined
- Oct 24, 2021
- Messages
- 25
- Office Version
- 365
- Platform
- MacOS
I have developed a macro to seek user input on the date of the month for data to be extracted from one worksheet to be pasted to another. Once I have pasted the relevant data to the correct cells/columns I need to provide a date in column A for each new row.
The macro I have is ...
Sub DateInputBox()
Dim dte As Date
mbox = InputBox("Enter date of month ending", "Month oif Data")
If IsDate(mbox) Then
dte = CDate(mbox)
Else
MsgBox "This is not a date! Try again."
End If
Debug.Print dte
End Sub
I have tried various options unsuccessfully to access the date to copy and paste it in the other workbook in column A (this macro is embedded rather than called in the main subroutine with the destination being ... cells(irTarget+2,1).select ...).
Any assistance and pointers would be appreciated.
Cheers
Alistair
The macro I have is ...
Sub DateInputBox()
Dim dte As Date
mbox = InputBox("Enter date of month ending", "Month oif Data")
If IsDate(mbox) Then
dte = CDate(mbox)
Else
MsgBox "This is not a date! Try again."
End If
Debug.Print dte
End Sub
I have tried various options unsuccessfully to access the date to copy and paste it in the other workbook in column A (this macro is embedded rather than called in the main subroutine with the destination being ... cells(irTarget+2,1).select ...).
Any assistance and pointers would be appreciated.
Cheers
Alistair