Hi, I have a code in my "Before_Close" Sub, which stops the user closing my Excel file using the X in the top right corner.
To exit I have an exit button which sets range "A50" to TRUE,then saves and quits. This bypasses the
"If CloseMode".
My Workbook_Open sets "A50" to FALSE
If Range("A50") = FALSE Then
If CloseMode = vbFormControlMenu Then
Cancel = True
End If
End If
My problem is, in my Office XP Pro, it works great but when I take it to a system running Office 2000, the code fails. The reference library says that MS Word 10.0 Object library is missing. I then select the MS Word 9.0 Object library and everything is working again. Fine until I take it back to my system where it resets the reference to MS Word 10.0 again.
I move my program from home to work frequently.
How do I get around this problem?
Thanks for any assistance!
To exit I have an exit button which sets range "A50" to TRUE,then saves and quits. This bypasses the
"If CloseMode".
My Workbook_Open sets "A50" to FALSE
If Range("A50") = FALSE Then
If CloseMode = vbFormControlMenu Then
Cancel = True
End If
End If
My problem is, in my Office XP Pro, it works great but when I take it to a system running Office 2000, the code fails. The reference library says that MS Word 10.0 Object library is missing. I then select the MS Word 9.0 Object library and everything is working again. Fine until I take it back to my system where it resets the reference to MS Word 10.0 again.
I move my program from home to work frequently.
How do I get around this problem?
Thanks for any assistance!