Posted by Jean on August 01, 2001 8:35 AM
I have a new Excel/VBA application which runs without problems (flawlessly in fact) on three PCs and fails at various points on four other PCs. All PCs have Windows 97, Excel 97 - SR2, and Win NT 4.0 with Serice Pack 5 installed.
Runtime errors observed include (1) "Format$" not accepted (2 PCs), (2) "Format$" accepted but unable to set 'PrintTitleRows' property of Page Setup class (1 PC), or (3) unable to unprotect one password protected worksheet, while having successfully unprotected another password protected worksheet (1 PC).
Obviously a required Excel file(s), DLL or otherwise, is missing from the "bad" installations. Can anyone provide suggestions here?
Thanks,
Jean
Posted by Jerid on August 01, 2001 10:44 AM
Jean Try this
1)Open the app on one of the PC that don't
2)Open the VBE
3)Select tools, and references
4) See if one of them say MISSING in front of the name.
If so you should be able to do the same thing on one of the working PC's and then click on that reference and get the dll name from the frame below, then copy that dll and move it to the non-working PC's
If not the write down all the checked references and compare them to the checked references on the working PC's
Hope this helps.
Jerid
Posted by Jean on August 02, 2001 11:37 AM
Thanks Jerid. I'm still working on this (in "spare" time), and am noting that date/time stamps on the "bad" PC files are generally older than those on my own files. In your experience, would it be "safe" to copy only the files in question, or is a new, custom installation in order. I'm puzzled because both PC installations (for Office 97 and Excel 97) were originally done from the same CD.
Thanks again,
Jean
Posted by Jerid on August 02, 2001 11:51 AM
Jean,
The times I have found missing dll's (Usually with MS Access) I have had success just copying the missing files.
If I found that more than one or two files were missing then I would probably reinstall office.
Jerid
Posted by Jean on August 02, 2001 1:54 PM
Hello Jerid - I've reinstalled Office 97, unfortunately without solving the problem. The symptoms on the "bad" PC include:
(1) Unable to unprotect one password protected worksheet, while having successfully unprotected another password protected worksheet in the immediately preceding VBA statement.
(2) Possibly related to (1): clicking on a control button on the worksheet that could not be unprotected generates message "Cannot exit design mode because Control 'CommonDialog1' can not be created" and then locks up all worksheet control buttons.
I've ensured that the VBE Tools->References files are identical between the "bad" and the "good" PCs (same date/time stamps).
Thanks for any advice on this!
Jean
Posted by Jerid on August 03, 2001 6:15 AM
Can you provide a sample of the code where the problem occurs?
Posted by Jean on August 07, 2001 9:59 AM
08/07/2001: Here it is - it fails on the second "Unprotect" command. The "Can't exit design mode" part of the message (above Post) is puzzling, because nothing (I am aware of) is in design mode.
Private Sub UpdateMasterDatabaseButton_Click()
Run ("UpdateMasterDatabaseWithInductorData")
End Sub
Public Sub UpdateMasterDatabaseWithInductorData()
Dim InputRow As Double
Dim OutputRow As Double
Worksheets("Inductor Sheet").Unprotect Password:="caribouII"
Worksheets("Master Database XLS").Unprotect Password:="caribouII"
etc etc
End Sub
Thanks(!) Jerid. Jean
Posted by Jerid on August 09, 2001 12:02 PM
I'm stumped. Just for the hell of it try this just to see if things change for you.
Private Sub UpdateMasterDatabaseButton_Click()
'This was the Excel4 method of calling a macro
'Run ("UpdateMasterDatabaseWithInductorData")
'Try this method, I don't hold a lot of promise here, but it's worth a shot.
Call UpdateMasterDatabaseWithInductorData
End Sub
Not much help, sorry :-(
Jerid