K
Kigol
This code is causing a workbook to throw the error "Document not
saved". Oddly enough it saves fine once I remove it. How can a message
box cause such a problem?
It gets stranger....If I create a new workbook and paste the code in
there it saves without a problem. The original workbook has 11 sheets
and a decent amount of data if that matters, (which I don't think it
does). Is this some kind of fluke bug or is there an explaination?
Excel 2k3, SP2
Public Sub Initialize()
check = MsgBox("Have you created/renamed all columns on all sheets as
follows?" & vbNewLine & _
"" & vbNewLine & _
"CUSIP - should contain all CUSIPs" & vbNewLine & _
"ISIN - should contain all ISINs" & vbNewLine & _
"BID - should contain all BID prices" & vbNewLine & _
"ASK - should contain all ASK/OFFER prices" & vbNewLine & _
"SYCODE - create, will initially be blank" & vbNewLine & _
"INVERT - create, will initially be blank" & vbNewLine & _
"MID - create, will initially be blank" & vbNewLine & _
"" & vbNewLine & _
"Please note that all columns must exist for the macro to work
properly." & vbNewLine & _
"", vbYesNo)
If check = 7 Then
Exit Sub
End If
'Var = Application.InputBox(Prompt:="This is a test", Type:=0)
'MsgBox (Var)
End Sub
saved". Oddly enough it saves fine once I remove it. How can a message
box cause such a problem?
It gets stranger....If I create a new workbook and paste the code in
there it saves without a problem. The original workbook has 11 sheets
and a decent amount of data if that matters, (which I don't think it
does). Is this some kind of fluke bug or is there an explaination?
Excel 2k3, SP2
Public Sub Initialize()
check = MsgBox("Have you created/renamed all columns on all sheets as
follows?" & vbNewLine & _
"" & vbNewLine & _
"CUSIP - should contain all CUSIPs" & vbNewLine & _
"ISIN - should contain all ISINs" & vbNewLine & _
"BID - should contain all BID prices" & vbNewLine & _
"ASK - should contain all ASK/OFFER prices" & vbNewLine & _
"SYCODE - create, will initially be blank" & vbNewLine & _
"INVERT - create, will initially be blank" & vbNewLine & _
"MID - create, will initially be blank" & vbNewLine & _
"" & vbNewLine & _
"Please note that all columns must exist for the macro to work
properly." & vbNewLine & _
"", vbYesNo)
If check = 7 Then
Exit Sub
End If
'Var = Application.InputBox(Prompt:="This is a test", Type:=0)
'MsgBox (Var)
End Sub