I have a workbook with a lot of VBA in it. It works fine on several other computers, but it no longer
works on mine (I wrote the code, so it did work at one point in time). Now, when using certain routines, I get
"Automation Error: Unspecified Error" quite frequently.

Most of the time this happens, it shows
Workbook_SheetBeforeRightClick as the problem. I've tried removing the code from there and replacing it with a simple msgbox,
and it still errors. I also tried removing the entire routine, then re-adding it through the Combo Boxes (where you choose
the object, then choose the event). Just choosing the event there raises the error.

There has to be something
wrong with my PC/Excel version, but I've reinstalled the program several times to no avail... Help!

I have written an Excel Add-In that adds an item to the
standard Excel menu, with various functions that are
called by the sub-menu items. I last worked on the code in
July 2003, at which time it compiled and executed without
problems. I now need to work on the code again, but it no
longer compiles. When I attempt to compile from the Visual
Basic window, it fails on the first line (Private
mobjExcelBook As Excel.Workbook), with the
message "Compile Error: Automation error". If I comment
out this line, it fails on the next object declaration
line: Private mcolSheets As VBA.Collection. The object
browser shows these objects, and the References are
correct, and unchanged since the previous work that
compiled. (Microsoft Excel 9.0 Object Library, EXCEL9.OLB,
and others)

When I shut down the Add-In, I get another error message
entitled "Microsoft Visual Basic", with the message:
Automation Error, Unspecified Error, and then the VBA
window opens again in debug mode.

Now the clincher: the code actually executes correctly
when I invoke the menu items, and does not throw any
errors!

I am developing on Windows 2000 Professional (5.0.2195 SP-
4), and using Excel 2000 (9.0.3821 SR-1). I open and run
this Add-In not as a selected Add-In in Excel, but by
simply double-clicking the .xla file.

I do not recall installing any other software since the
last time I worked on this code, other than a couple of
Windows updates. I have run Regclean.exe a couple of times
since these errors first appeared, and allowed it to
repair the registry.

The only other hint might be that I wrote a bit of Windows
API code when I was working on the Add-In in July. But at
the time, this compiled and executed correctly too.

Don't know for sure, but go to the VB Editor
Tools menu > References
see if any are marked as missing.

If they are, uncheck them and try again.

steve

"Francisco
J. Melendez" > wrote in
message ...
> We have a spreadsheet with macros developed internally.
> The macro uses ole automation etc. The workbook functions
> properly in all machines except for one, where we get
> a "VBA Error: Automation error, Unspecified error" popup.
> The user is clicking on a form button that clears a
> predifined range. It works fine in all other machines.
> Have run repair for Office, checked all patches are
> installed. Same office configuration. No idea this does
> not show in the knowledge base when i search for it. Alll
> machines running windows 2000 and office 2000.

I have a friend that is using an Excel Spreadsheet and they have recently upgraded their computer.

Now when they
open a file we have been passing back and forth. They get an error:
Automation Error
Unspecifid Error
Sometimes they can get past that, but when they go to save they get: "Cannot Save".
I briefly looked at the VB code, with not luck.

This is specific to her computer, so I am wondering if something
else needs to be setup or configured properly. We have tried uninstalling, etc.

I have created a macro that can load text data into a worksheet then perform
some various calculation and make some graphs from the data.

The macro works fine on my computer. However, when
it is opend on another
computer an error "Automation Error, Unspecified Error" pops up. The
buttons that I created to begin the calculations and charting are displayed
but when they are clicked another "Automation Error" occurs.

I am on a Win2K machind runngin Excel 2000
9.0.3821 SR1, the other computer
is WinXP Pro Excel 2000 9.0.2720.

Is there some type of setting that excel need turned on to run macros?

I usually run this from the code screen. At the moment, it stops at the aforementioned line on the
first chart of every new file that is opened. If I "Debug" then click on my spreadsheet where the charts are going and then
go back to the code, it allows me to continue.

I have some straight-up VB experience, but when it comes to VBA I am a
little shaky on a few concepts. I am hoping someone here can help me with a
problem I have run into.

I recently wrote a macro that consists of a few user forms. On most
machines, it runs exactly as intended. On two machines, I get error messages
"Automation Error. An unspecified error has occurred.". I took out my error
trapping hoping to catch the offending code line, but it appears to be
happening before any code is executing.

Thinking perhaps it has something to do with control references (I added
the
MS dialog control, and MS Picture combo during design), I tried to add these
components from the users computer, but cannot save the workbook afterwards.
I assume since these controls show up on the list of available
references/controls, that they are properly registered? Is there a way I
must reference them in code? Or am I completely barking up the wrong tree?
At this point, I am not sure what is going on... can anyone offer some
suggestions?

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

I get and error saying: Run-time error -2147467259 (80004005)
Automation error
Unspecified errorHowever, if I step through the macro using F8 it works fine. Is there some kind of problem with my code or
is this some sort of Excel bug?

I have followed same steps listed here
http://www.ozgrid.com/Excel/stacked-column.htm but cannot position data labels above column.

Excel only gives me
the options Center, Inside End, and Inside Base.

I also tried setting label position with VBA:

VB:

ChartObjects
For Each s In co.Chart.SeriesCollection
If s.Name = "Totals" Then
For Each dl In s.DataLabels
dl.Position = xlLabelPositionOutsideEnd
Next dl
End If
Next s
Next co

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

Also tried the following without luck:

VB:

dl.Position = xlLabelPositionAbove

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

For each VBA example I get following error:

Run-time error '-2147467259 (80004005)':
Automation error
Unspecified errorIt seems like Microsoft has removed this positioning option for stacked column charts because it works fine
for normal column charts. Anyone find a way to do this otherwise?

"VJ" > wrote in message
...
> Can somebody suggest me why I am getting "Unspecified Error" when the
> following line of code executes.
>
> Debug.Print
>
Application.Workbooks("WBName.xlt").VBProject.VBCo mponents.Item("FormName").
Properties.Item("ShowModal").Value
>
> Before opening the workbook, I am unlocking it which is working fine but
for
> some reason I am not able to get reference to the Properties collection.
It
> works fine sometimes when I run in the debug mode.
>
> Help would be appreciated.
>
> Thanks,
>
>

I am having a really difficult time with this code. I am trying to fill in some fields on an webpage in an effort to
eventually retrieve some data. I have read lots of posts on the topic and somehow I'm still confused.
My code crashes on this line and gives an Automation error, Unspecified Error message:

VB:

appIE.document.forms(0)

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

No matter what I try, I can't get past this line.
I have also tried:

VB:

appIE.document.all

If you like these VB formatting tags please consider sponsoring the author in support of injured Royal Marines

Until recently I have been using an
excel add-in without a problem, but then
on Tuesday it stopped working - whenever I load excel I get a pop-up window
headed 'Microsof Visual Basic' and the message is "Automation Error -
Unspecified Error". The options are OK or Help - but clicking Help gives no
further info at all! Clicking OK load the 'Microsof Visual Basic' window,
which, when I close it, tells me that this will stop the debugger. I am then
returned to excel, which works fine except without the add-in.

I know that the add-in file itself is OK, because
many other workstations
use it with no problems. Also my registry keys look OK - same as at other
workstations where the add-in works, and my list of references match those
at the other worstations. I have uninstalled and reinstalled the add-in a
number of times, same result.

at the very end of running the installation of the add-in
when initially loading excel (at which time the add-in is ticked in the list
under tools > addins
when I click on Tools > Synergy Reporting Path (this appears as the first
item under tools)
when I click OK after deselecting the add-in (in the list under tools >
addins)

Having deselected the add-in, excel works fine.

I hope someone can suggest what the problem
might be - it's got me (and more
significantly the author of the add-in) stumped!

I am trying to use the code shown below to get information to transfer from
Excel to Access. When I hit "Run", I receive a Run Time Error with this code
'-2147467259(80004005)': Automation Error, Unspecified Error
In my references, I have selected: VBA, Excel 11.0 Object Library, OLE
Automation, MS Office 11.0 Object Library, MS Forms 2.0 Object Library, MS
ActiveX Data Objects 2.0 Library.
I don't know where to choose between ADO and DAO for data import or export, too.
If anyone has any ideas, please help!