I have a report that is linked with formulas that point to monthly folders and therefore as part of the monthly reports need to update all workbooks.....I am using message boxes that the user inpupts the month into and it will use that data to save the reports, etc.
Now, since I need to update formulas, I want to use the data the user inputs to do a find/replace as the macro opens up a wokrbook, updates, saves, and prints that report.
So, I know I may be wayyyy offf as an accountant, this was not a class in college, lol
Please see if I am even close to what I should be doing or should I use something else...anyyyy help I will appreciate
Basically I need to replace last's month info (i.e. 01-09 to be replaced02-09 in Febs reports) and the user is who is telling the macro what months to replace with what data....Thanks for taking the time to read and help
Sub CurrentMonth ()
Dim message As String
Dim userresponse As String
message = _
"Type in a two (2) digit Report Month and Year." & vbCrLf & _
"" & vbCrLf & _
" MM-YY"
TitlebarTxt = "Enter Report Month"
defaultTxt = ""
userresponse = InputBox(message, TitlebarTxt, defaultTxt)
End Sub
=============================
Sub PreviousMonth()
Dim message As String
Dim userresponse2 As String
message = _
"Type in a two (2) digit Report Month and Year." & vbCrLf & _
" FOR LAST MONTHS REPORT DATE" & vbCrLf & _
"" & vbCrLf & _
" MM-YY"
TitlebarTxt = "Enter Last Month's Report Month"
defaultTxt = ""
userresponse2 = InputBox(message, TitlebarTxt, defaultTxt)
End Sub
=======================
Sub Update Reports()
Columns("E:F").Select
Selection.Replace What:=userresponse2, Replacement:=userresponse
End Sub
Now, since I need to update formulas, I want to use the data the user inputs to do a find/replace as the macro opens up a wokrbook, updates, saves, and prints that report.
So, I know I may be wayyyy offf as an accountant, this was not a class in college, lol
Please see if I am even close to what I should be doing or should I use something else...anyyyy help I will appreciate
Basically I need to replace last's month info (i.e. 01-09 to be replaced02-09 in Febs reports) and the user is who is telling the macro what months to replace with what data....Thanks for taking the time to read and help
Sub CurrentMonth ()
Dim message As String
Dim userresponse As String
message = _
"Type in a two (2) digit Report Month and Year." & vbCrLf & _
"" & vbCrLf & _
" MM-YY"
TitlebarTxt = "Enter Report Month"
defaultTxt = ""
userresponse = InputBox(message, TitlebarTxt, defaultTxt)
End Sub
=============================
Sub PreviousMonth()
Dim message As String
Dim userresponse2 As String
message = _
"Type in a two (2) digit Report Month and Year." & vbCrLf & _
" FOR LAST MONTHS REPORT DATE" & vbCrLf & _
"" & vbCrLf & _
" MM-YY"
TitlebarTxt = "Enter Last Month's Report Month"
defaultTxt = ""
userresponse2 = InputBox(message, TitlebarTxt, defaultTxt)
End Sub
=======================
Sub Update Reports()
Columns("E:F").Select
Selection.Replace What:=userresponse2, Replacement:=userresponse
End Sub