boblarson
Smeghead
- Local time
- Today, 03:29
- Joined
- Jan 12, 2001
- Messages
- 32,059
First up -
This code
is there just for while you get it all sorted out. Otherwise you won't be able to see anything of what is going on and right now that is important. When all is working then you comment out that line and it will remain hidden to everyone.
Before you run the code each time have you opened up your task manager to make sure that there are no instances of Excel.EXE running in the processes window? It is important until we get it all working that you maike sure there aren't any until we get this figured out.
So, find this line in the export function:
On Error GoTo err_handler
and comment it out by putting an apostrophe in front of it like this:
'On Error GoTo err_handler
Then when you get your error you can click the DEBUG button and it will take you to the part that is having the problem. Once you get there find out what the values are of the variables we are using in the OpenWorkbook part. If you hover your mouse over the variable name while in break mode like that, you can see what the value is. Report back as to what it is so I can have a better clue as to what is happening.
The next time it errors
This code
Code:
' this is here for debugging only. comment it out for production so Excel doesn't show.
objXL.Visible = True
Before you run the code each time have you opened up your task manager to make sure that there are no instances of Excel.EXE running in the processes window? It is important until we get it all working that you maike sure there aren't any until we get this figured out.
So, find this line in the export function:
On Error GoTo err_handler
and comment it out by putting an apostrophe in front of it like this:
'On Error GoTo err_handler
Then when you get your error you can click the DEBUG button and it will take you to the part that is having the problem. Once you get there find out what the values are of the variables we are using in the OpenWorkbook part. If you hover your mouse over the variable name while in break mode like that, you can see what the value is. Report back as to what it is so I can have a better clue as to what is happening.
The next time it errors