1004 Run-time error

I tried doing a search for this error message, but couldn't find one related to my problem, so here goes.

Running Excel 2000 here and this macro (snippet below) has been running fine on several machines. Suddenly, this one machine in particular has been getting a 1004 Run-time error (With statement).

I have an idea what the problem is, but the thing that gets me is this code still successfully works on several other machines at my work place.

I know the code is sloppy, as you'll see below. I'm simply trying to fix something that was already in place before I got here. I'll definitely clean it up once I get it working.

Any ideas? Thanks in advance for the help.

--

Sub maketable()

Application.DisplayAlerts = False
Application.ScreenUpdating = False

DirPathVars

Workbooks.Add
With Application
.DefaultFilePath = DPTH1 & DPTH11
.SheetsInNewWorkbook = 1
Cells.Select
.StandardFont = "Century Schoolbook"
.StandardFontSize = 8
Selection.ColumnWidth = 2
Selection.RowHeight = 13 '13

End With

....

[1160 byte] By [deltree] at [2007-12-23]
# 1
Something additional I noticed on the problem machine. When I click on Options in the Tools menu, nothing shows up.
deltree at 2007-8-30 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 2

Hi,

Thats a classic scenario for a missing reference or even a COM versioning problem. On the machine with the error, open the workbook, goto the Macro Editor and do Tools->References, check the list of items there and see if anything is missing or referencing an older or more recent file.

Thats a good place to start.

.

DerekSmyth at 2007-8-30 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...
# 3

What I actually did was go into the registry and compare the settings which apparently didn't match in certain areas. After altering a few values, everything ran smooth.

Just FYI, if it matters
HKEY_CURRENT_USER\Software\Microsoft\Office\9.0\Excel\Options

"Options" didn't match and "Asst In Wizard" was missing among a few others.

Thanks for the help all.

deltree at 2007-8-30 > top of Msdn Tech,Microsoft ISV Community Center Forums,Visual Basic for Applications (VBA)...