melodramatic
Board Regular
- Joined
- Apr 28, 2003
- Messages
- 180
- Office Version
- 365
- Platform
- Windows
I have a macro that I've been using for some time, but it quit on me after my Office 365 update last Friday.
In troubleshooting, I added msgboxes everywhere to see what I was getting. The variables are being assigned correctly. I unprotected all sheets, just in case it didn't like working on protected sheets (although the cells with variables being enter are always unlocked).
Basically, as soon as the Test Binder Prep Macro file opens up (and it does open), everything quits.
Help?
In troubleshooting, I added msgboxes everywhere to see what I was getting. The variables are being assigned correctly. I unprotected all sheets, just in case it didn't like working on protected sheets (although the cells with variables being enter are always unlocked).
Basically, as soon as the Test Binder Prep Macro file opens up (and it does open), everything quits.
Help?
VBA Code:
Sub TestBinderPrep()
'
' This Macro calls up the Test Binder Prep macro
' Macro created 9/22/2017 by Melody October May
'
Application.ScreenUpdating = False
Application.DisplayAlerts = False
If Left(Range("G2"), 3) = "XXX" Then
resp = MsgBox("Test Binder Prep cannot run " & vbNewLine & "without forms first being created." & vbNewLine & vbNewLine & _
"Please run the ''Complete Forms'' macro above, then you may return to the Test Binder Prep macro.", vbOKOnly, "Forms for Binder Prep do not exist")
Exit Sub
End If
If MsgBox("You will be opening the Test Binder Prep macro, to create Specimen & Test folders, as well as test documentation.", vbOKCancel, "Confirm opening file") = vbCancel Then
Exit Sub
Else
Dim macroPath As String
Dim PN As Long
Dim ConnType As String
PN = Range("B5")
If Left(Range("B13"), 3) = "XOM" Then
Protocol = "XOM"
Else
Protocol = "ISO / API"
End If
ConnType = Range("B12")
If Left(PN, 3) = 520 Then
macroPath = "N:\In House Projects\9200006 - Administration\ISO TESTING Projects\MACRO\"
Else
macroPath = "P:\LAB\ISO TESTING Projects\MACRO\"
End If
Workbooks.Open Filename:=macroPath & "\Test Binder Prep Macro.xlsm", ReadOnly:=True
'THIS IS WHERE IT'S HANGING UP - NOTHING ELSE HAPPENS AFTER OPENING THE FILE (
Sheets("Input").Select
Range("F6").Value = PN
Range("K1").Value = Protocol
Range("K2").Value = ConnType
MsgBox "Please input the tests you'll be setting up, then press 'Create Binders'"
End If
End Sub