Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
It's just as well you don't need to code it from scratch, then - you simply copy & paste from the tutorial and adjust the 'Delay' value.That just gives me the willies...
Ummmm, no.Hi Gerry,
Didn't you forget a bit of the code??
Actually:
{SET Delay 9}
should have been:
{SET Delay -1}
That's what I meant - you copied nearly all of it, but not quite ...yes, I did not copy ALL of the code
Function LastMonth() As String
Dim strMonthText As String
Dim strYearText As String
Select Case Format(Now, "m")
Case 1 ' January
strMonthText = "December, "
strYearText = Format(Now, "yyyy") - 1
Case 2 ' Feb
strMonthText = "January, "
Case 3 ' March
strMonthText = "February, "
Case 4
strMonthText = "March, "
Case 5
strMonthText = "April, "
Case 6
strMonthText = "May, "
Case 7
strMonthText = "June, "
Case 8
strMonthText = "July, "
Case 9
strMonthText = "August, "
Case 10
strMonthText = "September, "
Case 11
strMonthText = "October, "
Case 12
strMonthText = "November, "
End Select
If strYearText <> Format(Now, "yyyy") - 1 Then
strYearText = Format(Now, "yyyy")
End If
LastMonth = strMonthText & strYearText
End Function
Sub TestLastMonth()
MsgBox LastMonth
End Sub
Sub TestLastMonth()
Sub TestLastMonth()
Selection.TypeText LastMonth
End Sub
Sub FillBM(strBM As String, strText As String)
Dim r As Range
Set r = ActiveDocument.Bookmarks("LastMonth").Range
r.Text = strText
ActiveDocument.Bookmarks.Add Name:=strBM, Range:=r
End Sub
Sub TestLastMonth()
Call FillBM("LastMonth", LastMonth)
End Sub
Function LastMonth() As String
Dim Month As Integer
Dim Year As Integer
Month = (Format(Now, "m") - 1) Mod 12
If Month = 0 Then
Year = Format(Now, "YYYY") - 1
Else
Year = Format(Now, "YYYY")
End If
LastMonth = Format(Month, "mmmm") & ", " & Year
End Function
Public Function LastMonth() As String
LastMonth = Format(DateAdd("m", -1, Now), "mmmm, yyyy")
End Function