Hi:
I have been serching for a while but can not find what I am looking for as the serch is returning too many hits. Hopefully someone here can redirect me to a post or offer a suggestion
I am trying to include a date in my Input Box message. Can it be done? The date is always stored in cell E2 of the Receipt Register sheet and I prefer it to appear in the message in the format yyyy/mm/dd if possible.
Here is my Input Box Message:
Here is the whole code I am using.
ANOTHER PROBLEM I am having is that I would like the Input Box to accept a NUMBER ONLY. Currently I can type ion 123.45aaa and it accepts it. I did change:
Dim GrandTotal As Long
to
Dim GrandTotal As String
When I used Long it would not pick up the numbers after the decimal.
ANY guidance as always is GREATLY Appreciated
Take Care,
Mark
I have been serching for a while but can not find what I am looking for as the serch is returning too many hits. Hopefully someone here can redirect me to a post or offer a suggestion
I am trying to include a date in my Input Box message. Can it be done? The date is always stored in cell E2 of the Receipt Register sheet and I prefer it to appear in the message in the format yyyy/mm/dd if possible.
Here is my Input Box Message:
Code:
GrandTotal = Application.inputbox("Enter the GRAND TOTAL of the Daily Summary Report for: ", "Enter Amount PLEASE.", "") [B]'[COLOR=red], Type:=1) [/COLOR][/B]
[B][COLOR=red]'I removed Type:=1 and changed LONG to STRING in the DIM[/COLOR][/B]
[B][COLOR=red]' because I could not get it to pick up the numbers AFTER the[/COLOR][/B]
[B][COLOR=red]'Decimal[/COLOR][/B]
Here is the whole code I am using.
ANOTHER PROBLEM I am having is that I would like the Input Box to accept a NUMBER ONLY. Currently I can type ion 123.45aaa and it accepts it. I did change:
Dim GrandTotal As Long
to
Dim GrandTotal As String
When I used Long it would not pick up the numbers after the decimal.
Code:
Sub InputBoxTEST()
Dim i As Long
Dim GrandTotal As String 'Long
i = Range("H64536").End(xlUp).Row
'Find last row with data in column G
LastRow = Range("G65536").End(xlUp).Offset(3, 0).Row
Range("G" & LastRow) = "GRAND TOTAL from the Daily Summary Report:"
'Add formula to Sum up Column H
LastRow = Range("H65536").End(xlUp).Offset(3, 0).Row
GrandTotal = Application.inputbox("Enter the GRAND TOTAL of the Daily Summary Report for: ", "Enter Amount PLEASE.", "") ', Type:=1)
If IsNumeric(Application.Match(False, GrandTotal, 0)) Then
MsgBox "Not All Entries Complete - Action Cancelled", vbCritical, "Incomplete"
Else
LastRow = Range("H65536").End(xlUp).Offset(3, 0).Row
Range("H" & LastRow).Select
Range("H" & LastRow) = GrandTotal
End If
End Sub
ANY guidance as always is GREATLY Appreciated
Take Care,
Mark