launch Excel failed

I have a Excel spreadsheet to run function and retrieve data from Access 
database.

My Excel is able to launch MS Access, but one machine is failed to run it 
automatically.

I can manually run the MS Access application and the Excel still can run the 
function and get data.

I would like to run the MS Access application automatically.

what could be problem?
Is it posssible the machine missing some dll?
If yes, Excel can get data from database.

The code is failed when the Excel open ADO connection.

Your information is great appreciated,


0
Utf
2/14/2008 12:16:02 PM
access.formscoding 7493 articles. 0 followers. Follow

4 Replies
822 Views

Similar Articles

[PageSpeed] 13

hi,

Souris wrote:
> The code is failed when the Excel open ADO connection.
What code? I don't see any...

mfG
--> stefan <--
0
Stefan
2/14/2008 12:22:17 PM
 Dim DbPath As String
 Dim MyConnection As String
 Dim MySQL As String
 
 On Error GoTo Err_Workbook_Open
 
 DbPath = "D:\MyDB\MyDb.mdb"
  
 MyConnection = "Provider=Microsoft.Jet.OLEDB.4.0;"
 MyConnection = MyConnection & "Data Source=" & DbPath & ";"
  
 MySQL = "SELECT COUNT(*) FROM tblMyTable WHERE USERID = " & """" & "MyID" & 
""""
  
 Set MyDatabase = CreateObject("adodb.recordset")
 MyDatabase.Open MySQL, MyConnection, 0, 1, 1

The code failed at "MyDatabase.Open MySQL, MyConnection, 0, 1, 1"

Only one machine fails to open the connection.
It works when I manual to run the mdb.

Thanks again,


"Stefan Hoffmann" wrote:

> hi,
> 
> Souris wrote:
> > The code is failed when the Excel open ADO connection.
> What code? I don't see any...
> 
> mfG
> --> stefan <--
> 
0
Utf
2/14/2008 12:59:00 PM
hi,

Souris wrote:
> The code failed at "MyDatabase.Open MySQL, MyConnection, 0, 1, 1"
> Only one machine fails to open the connection.
What error message do you get?


mfG
--> stefan <--
0
Stefan
2/14/2008 1:32:38 PM
Thanks for the message,
I do not remember details.
I will go to user machine and check it.

Thanks again,

"Stefan Hoffmann" wrote:

> hi,
> 
> Souris wrote:
> > The code failed at "MyDatabase.Open MySQL, MyConnection, 0, 1, 1"
> > Only one machine fails to open the connection.
> What error message do you get?
> 
> 
> mfG
> --> stefan <--
> 
0
Utf
2/14/2008 7:38:00 PM
Reply:

Similar Artilces:

macros with pivot table in excel 97
I am downloaded a access report to excel and running a macro to create a pivot table. It works the first couple of days and then runs but changes all the data to "1's" Any ideas CJ ...

EXCEL #43
EXCEL ÇALIŞMA SAYFAMDA KOPYALA,KES,YAPIŞTIR ÇALIŞMIYOR If your cut,copy and paste functions are not working in excel then there is a big possibility that the spreadsheet is protected. Please take the protection off the spreadsheet and try to copy,cut and paste again. hth -- Thank you and Regards Garreth Lombard "AKADEMİ" wrote: > EXCEL ÇALIŞMA SAYFAMDA KOPYALA,KES,YAPIŞTIR ÇALIŞMIYOR ...

Excel crashes
We're running Excel 2003 with SP3 on Window XP sp3. I have a couple users experiencing frequent Excel crashes. One of them even got a report of Excel crashing when Excel wasn't even running. In both cases, when Excel is restrarted, it "recovers" files that they were not working on. Any clues? ~Jason Just a guess... Try changing the default printer to something else--even if you have to install a different printer driver for a printer that doesn't physically exist. I read somewhere that lots (most???) windows crashes are caused by bad printer driver...

slow launch
My work laptop is becoming almost unbearable lately. After logon the wallpaper appears immediately but the Taskbar and Desktop icons take fully three minutes before they even appear! Add another two or more minutes for the disk activity to slow down and it can take me at least five minutes after logon to be able to open any application. During this time the disk activity LED is essentially solid on, so something is happening in the background. After everything stops the laptop acts normally and is not slow during use. There is one application, FreeCommander, that once launched ta...

Using Sumproduct
I am currently working on a spreadsheet where I need to solve two problems both of which I think can be done with Sumproduct but unfortunately I am having difficulty getting my head round it. I basically want to add up the corresponding entries which satisfy two conditions and then three conditions The worksheet called "chargeablehours" has multiple columns but the four important ones are:- Column A - Project ID Column D - CLSStage Column H = Date Column I - Hoursworked In an seperate worksheet "Menu" (within the same workbook) I want to b...

publisth excel sheets to web
hello...i am publishing spreadsheets to the web - using file save as interactive html page. the concern i have is the size of the excel object that opens up. it's default is set to auto (which is a percentage of the browser size). is there a way for me to change this size to make the excel objext larger / smaller? thanks - sam. Hi Sam, You mean the default like in your browser for size. You can't change someone else's system or browser, if you can that would be a breach of security. Your bigger problem is putting an interactive HTML file on the web. If you do, you have...

Excel Office 2003
In Microsoft Excel Office 2003, where is the Quattro Pro converter? It's there for me, did you do a full install. If not re-run setup and add it to the list -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England nick_hodgeTAKETHISOUT@zen.co.uk.ANDTHIS "HM" <HM@discussions.microsoft.com> wrote in message news:E5B0E7E4-AA17-4EE5-89EC-6FE5CE706FB0@microsoft.com... > In Microsoft Excel Office 2003, where is the Quattro Pro converter? ...

Help killing Excel
This code works for ~20 sets of excel workbooks. ONE of the sets (a single workbook) always crashes the workbook, with a request to contact MS with the error report. The last crash gave me a DDE server crash error. Is there any thing in the sheet that would cause this? For i = 1 To rsMaster.RecordCount 'Set xl(i) = New Excel.Application 'Early binding Set xl(i) = CreateObject("Excel.Application") 'Late Binding With xl(i) If admin Then 'hide from user? .Visible = True Else ...

Excel Russian
Hi, I have an english version of windows and a english version of office 2003 I have got an excel document with some english -> russian translations in, i need to export these. I have got a russian font and when I change to the font type in a colmumn some chartacters are not showing up. is there anyway of sorting this out, i have no idea where to look or what to do? Thanks for any help Adrian. "Adrian Hirst" wrote: > Hi, > > I have an english version of windows and a english version of office 2003 I > have got an excel document with some english -> r...

Excel should let you graph every n-th data point in a column
I just want to make the suggestion that you should be able to graph every n-th data point in a set of data on a scatter plot. I have a set of data with thousands of points, and I have a model prediction to match. The best way to differentiate between a set of data and model prediction and experimental data is to make the expermental data points on the graph and make the model predictions a solid line. If you have many expermental data points on a graph, the data looks like a solid line no matter what you do to it. ---------------- This post is a suggestion for Microsoft, and Microso...

Can't open this item. The operation failed
Several E-mail messages from my inbox won't open. I get the following error message when I try to open them. Can't open this item. The operation failed ...

How do I get text effects in excel like those available in word
In MS Word you can get text effects under "Format" "Font" I want to do the same in excel - any suggestions please? I would also like to conditionally format an excel formulae to give an "effect" if it did not meet a given criteria - Conditional formatting does not provided "Text Effects" Thanks It does. Condiitional formatting providet COLOR effects. Conditional Formatting > click Format Button > select Color for formatting. -- Manatee ------------------------------------------------------------------------ Manatee's Profile: http://www....

AutoRecover in Excel 2002
AutoRecover feature does not appear to work Hi you may state your exact problem :-) If you have problems recovering a file one solution could be getting OpenOffice and try to open a corrupted file with that application (worked for me once) -- Regards Frank Kabel Frankfurt, Germany Lyle York wrote: > AutoRecover feature does not appear to work What did you expect it to do? Lyle York wrote: > > AutoRecover feature does not appear to work -- Dave Peterson ec35720@msn.com Short descriptions: Autosave (an addin in xl versions before xl2002), the workbook gets saved at user sele...

Controlling Word from Excel
Hello.. I've pasted an excel chart in word as a picture using vba. works fine. However i want to set certain formats that are normally under 'shape' I need to resize the picture, to wrap it and to position it. However, when i program in excel it seems that WdApp.shape doesn' work... can someone help me out here? ps i assume that a picture classifies as a shape? Thanks Iv -- Message posted from http://www.ExcelForum.com ...

Am I trying to do something that Excel cannot handle?
Here is the challenge: 1) On row 3 there are headings: 1st qrt, 2nd qrt, 3rd qrt, 4th qrt, 1st qrt, 2nd qrt., etc. representing subdivisions of calendar years. 2) On row 4, under each quarter heading, there is a sales forecast. The basic assumption is that what is forecast for the quarter must be on hand at the beginning of that quarter. 3) In cell A2: the user enters a leadtime in weeks for obtaining the product. 4) Based on the leadtime entered in cell A2, I want to auto-populate row 5, showing when the product should be ordered. So, if I need 500k pounds at the beginning of qrt 4...

MFC to launch MsDev
I am running MsDev 7.1 I would like to from a MFC project use automation to launch MsDev then load a text file etc... The problem is that when I use the 'Add Class' and select 'MFC Class from Typelib' and then choose 'Microsoft Development Environment 7.0' type library I cannot determine what interface to generate the class for. There is no _Application interface or similar like there is for each of the Office applications. MSDN documentation regarding MsDev automation has not been updated (shame!), and I am at a loss. Ideas? - Marty ...

Excel 2000
I have several thousand records where there is a column for middle initials. Every so often the middle initial does not have a period. Is there a way I can find those cells (or maybe highlight them), so I can add the periods? -- cmarshall ------------------------------------------------------------------------ cmarshall's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=30575 View this thread: http://www.excelforum.com/showthread.php?threadid=502217 cmarshall Select the column, Data, Filter, Autofilter. Custom filter, does not contain (a period) Beege &qu...

How to protect 2. axis in an Excel Chart to stay if data changes
A Pivot table is created on Tab1 in an Excel workbook. On Tab2 there is a Line Chart created with data from Tab 1 using 2 axis. If data in Tab1 change the 2nd axis on Tab 2 disappears, jumps ober and overrules axis 1. How can I protect chart area with 2 axis being able to change referring data in the pivot table. ...

Excel Issues
I have several issues: 1. I want to sort w/o using the sort function because I want to keep the specific formatting of the cell ( I want the cell to move with the data, with sort the data only moves and the cells stay the same) . I want to have a function where the selected data will automatically be sorted so that it moves to the top of the worksheet and the unselected data either moves below it (in a list that can be deleted)or becomes hidden when printing. e.g. x A B C x D becomes... x A x D B C 2. I want to create a check mark function so that the user can check mark the item...

Please Please Help Me New To Excel
okay i'll do my best to ask this question. I have this spread sheet I've beentrying to figure out It has the number 5 in I6, then in J6 the formula =I6/10*21 This spread sheet is to show us the current number of sales we have now and based on todays date what we are on pace to hit by the end of the month(Octobers projected sales finish) So, what I want to know is why does it say 10*21. I know that the "21" stands for the number of business days in the month (21 days in October), but what does the 10 represent??? I looked at another spread sheet from last month, ...

double launch at IE launch from quick launch
When I launch Internet Explorer I sometimes get a double launch. Most of the time I launch from the quick start bar. It happens also from the standard desktop icon also. ??? If you're looking for help here, the first piece of information we need is what version of Internet Explorer you are using and what version of Windows you are using (including the service pack number.) Next, keeping in mind that we are totally relying on your description, you need to explain exactly what a "double launch" means and why it happens only sometimes, along with any other detai...

function to download stock prices into Excel with 2007
I used to be able to download stock prices with a function in Excel 2003. Just had to click update prices once the function was in spreadhseet cells. Can't find one to use in Excel 2007. Is there a comparable extension available? I have a free file using Yahoo that will do as many as you like with one mouse click.Contact me ONLY at my address below. Or, If desired, send your file to my address below. I will only look if: 1. You send a copy of this message on an inserted sheet 2. You give me the newsgroup and the subject line 3. You send a clear expl...

Problem with Excel and Stock Quotes add-in
I use the msnsq addin for Excel and have for a long while. Recently, after updating stock quotes, and only on one computer, I get a crash in IE. It crashes after I close the disclaimer web page window after the update is complete. It doesn't affect the update, but it is irritating to get this same error every time Module shdocvw.dll. I note that when I get the error in iexplore.exe, it identifies an AppVer of 6.0.2900.2180. The ModVer of the shdocvw.dll is identified as 6.0.2900.2753 (at offset 000159a1). I've already uninstalled, reinstalled, updated , sliced, diced and pu...

IA for Excel v7.5 install problem
Have downloaded most current IM from CS and updated IA to the latest service pack but still can't get IA for Excel to run. Getting message about "not running or not enabled or not registered". (Anyone who has seen this error screen knows what I mean.) Any suggestions would be most appreciated. V7.5 on MSSql. Thanks you need to grant full access to the some keys in the Registry: See this techknowledge article in the knowledgebase Unable to Launch Visual Basic Editor from Great Plains (851245) "noyb" <noyb@anaoymous.ca> wrote in message news:OmgHYAViEHA.13...

Excel Chart #5
Im creating a simple chart of losses, i take each day of the end of the week , ending friday 6/03/05, 6/10/05, 6/24/05. I have omited 6/17/05 since there are no losses on that week, i create a chart but the chart always displays the 6/17/05 . I do not want it to show that date, is there a way i can omit that date from my chart? Thx Elaien Elaine If you can get the cell to return the error #N/A. To do this you use the NA function in the cell. (Just type =NA() in the cell for the losses on 6/17/05). -- HTH Nick Hodge Microsoft MVP - Excel Southampton, England nick_hodgeTAKETHISOUT@ze...