Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
839 views
in Technique[技术] by (71.8m points)

excel - Suddenly several VBA macro errors, mostly 32809

Suddenly my excel file is generating a lot of errors at startup.
No changes have been made to the file since before the errors started.

Example of errors:

Error 438:

Sheets("setup2").CheckBox4.Caption = "L?gg automatiskt till " & _ 
    Sheets("setup2").Range("L8").Value & " m?ndag efter jour."

Error 32809:

Worksheets(1).Visible = True
Worksheets(1).Cells(42, 3) = ActiveWorkbook.Path
Sheets("setup").Cells(43, 3) = Environ("UserName")
Worksheets(1).Cells(35, 13) = MostRecentDate

The workbook is not password protected.
It's Office 2013 (15.0.4659.1000) MSO (15.0.4659.1001)

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

Similar issue. Created an application to track welding procedures. My machine was running Windows 7 and Excel 2010. Anything I created, then distributed to other machines with different OS's or different Excel versions would have 32809 errors, usually associated with selecting a worksheet

Sheets("Data Entry").Select

This would trigger an Application or run time error 32809. I tried all of the fixes previously mentioned (delete all temp files, .exd files etc. No joy.

My solution ( may not work for you)

Opened the application on a machine that was Excel 2007. Added one comment line of code of no consequence into one of the macros

Sheets(sheetName).Select 
'comment of no consequence

and saved it. This caused a recompile. Closed and re-opened with Excel 2007 - all fixed.

If I add any code to these applications on my machine and then distribute, there is invariably an error when run, unless I get the application to recompile on the differing system. I sent the fixed version onto another machine running Excel 2007 and it worked fine.

Hope this makes sense and helps

Grant


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...