I have a code that got too long so I had to break it up into multiple codes that run in order. My begining statment of the code is a Message box that asks "Are you entering data for August" If the answer is yes then it runs a series of code, but now that my code has gotten too long I'm unable to continue that series of code for the month of August. I'm trying to make the change in code seamless. When the new code begins I could have it ask again what month you're entering data for but if possible I'd like to not. Ideally I want the first line of my new code to be If you answered Yes to the inital question in code one than proceed.
Does any of this make sense?
I'll post parts of my code:
Here's where I call all the code:
Sub PreScrub()
Call Tabs
Call AUGSUMMCEND
Call AugNUR
End Sub
The first code is just formatting, so I'll skip that. Here's my begining of my second code where I ask you the month:
Augbox = MsgBox("Are you entering Prescrub for August?", vbYesNo + vbQuestion)
If Augbox = vbYes Then
For i = 1 To recvarSumm.Rows.Count
For j = 1 To recvarSumm.Rows.Count
If recvarSumm.Cells(i, j).Value = "Aetna" Then
recvarSummvalues.Cells(i, j).Range("A1:C1").Copy
wsYTDSUMM.Columns(1).Find("Aetna").Offset(9, 1).PasteSpecial
End If
Next j
Next i
Then the code carries on from there for a long time. Then I want the begining of my AugNur code to say, If Augbox from AUGSUMMCEND is yes then continue. Is that possible??
Any help would be greatly appreciated!!
Aucun commentaire:
Enregistrer un commentaire