Hi all,
I am new to VBA in excel and have written the following code =
Private Sub CommandButton1_Click()
Dim strtDate As Date, fnshDate As Date
Dim n As Integer
strtDate = DateValue(Now)
fnshDate = DateValue("Mar 22,2010")
n = DateDiff("d", strtDate, fnshDate)
MsgBox n
Msg = MsgBox("Do you want to Transfer the Answer?", vbYesNo + vbQuestion, "SumMsgBox")
End Sub
I was hoping that someone could help me?
I am trying to get the answer from the Message Box transfered into a cell in Excel say A15 and everytime the button is pressed it moves down a line
also
I am trying to get it to add the date that the button was pressed in say B15.
Hope someone can help?
If this is not possible could someone sugest another way?
Thanks
I am new to VBA in excel and have written the following code =
Private Sub CommandButton1_Click()
Dim strtDate As Date, fnshDate As Date
Dim n As Integer
strtDate = DateValue(Now)
fnshDate = DateValue("Mar 22,2010")
n = DateDiff("d", strtDate, fnshDate)
MsgBox n
Msg = MsgBox("Do you want to Transfer the Answer?", vbYesNo + vbQuestion, "SumMsgBox")
End Sub
I was hoping that someone could help me?
I am trying to get the answer from the Message Box transfered into a cell in Excel say A15 and everytime the button is pressed it moves down a line
also
I am trying to get it to add the date that the button was pressed in say B15.
Hope someone can help?
If this is not possible could someone sugest another way?
Thanks
Last edited: