Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Hi,
I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Check the query table definition, it is probably attempting to access an
external file that is not on your new machine. -- Regards, Nigel "Leanne" wrote in message ... Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Try...
Sheets("Invoice Due").Range("A7").QueryTable.Refresh BackgroundQuery:=False -- Jim Cone Portland, Oregon USA http://www.realezsites.com/bus/primitivesoftware (Excel Add-ins / Excel Programming) "Leanne" wrote in message Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
hi
unless the pcs are accessed the file from a common file on the network, each pc must have the data source declared because the file path to the data soruce may be different from different pcs. Regards FSt1 "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Leanne,
You will probably have to update the location of your data file in your query... Select DATA | IMPORT EXTERNAL DATA | EDIT QUERY -- Mark Ivey "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Hi All,
Thank you all for your comments. I was hoping to make this file plug and play but I guess that will not be the case and I will have to install it on each computer myself - the users will not get it right! If only they were networked.............. "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#7
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
I have tried this but I am not to sure how to change the file path. When the
first box comes up in edit it lets me chose the new location but then after entering the dates it gives me the following messsage [Microsoft][ODBC Excel Driver] and then the file path is an invalid path but will not let me do anything more. Either that or I get a runtime error! Please help "Leanne" wrote: Hi All, Thank you all for your comments. I was hoping to make this file plug and play but I guess that will not be the case and I will have to install it on each computer myself - the users will not get it right! If only they were networked.............. "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#8
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Is there anything different about their version of Excel?
Did they get a full install? You may need to get out the Installation CD and see if there were any features overlooked during install that may be causing a problem with this issue... One more thought... do you have both the basic Addins checked (Analysis Toolpack, and the Analysis Toolpack - VBA)? Reaching, but it may help... Mark Ivey "Leanne" wrote in message ... I have tried this but I am not to sure how to change the file path. When the first box comes up in edit it lets me chose the new location but then after entering the dates it gives me the following messsage [Microsoft][ODBC Excel Driver] and then the file path is an invalid path but will not let me do anything more. Either that or I get a runtime error! Please help "Leanne" wrote: Hi All, Thank you all for your comments. I was hoping to make this file plug and play but I guess that will not be the case and I will have to install it on each computer myself - the users will not get it right! If only they were networked.............. "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#9
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Hi Mark,
I did not have these checked on my development computer. What difference there is between excel is 2000 & 2003 version. I do not know what the other users will have but would guess they will be the same or newer versions. "Mark Ivey" wrote: Is there anything different about their version of Excel? Did they get a full install? You may need to get out the Installation CD and see if there were any features overlooked during install that may be causing a problem with this issue... One more thought... do you have both the basic Addins checked (Analysis Toolpack, and the Analysis Toolpack - VBA)? Reaching, but it may help... Mark Ivey "Leanne" wrote in message ... I have tried this but I am not to sure how to change the file path. When the first box comes up in edit it lets me chose the new location but then after entering the dates it gives me the following messsage [Microsoft][ODBC Excel Driver] and then the file path is an invalid path but will not let me do anything more. Either that or I get a runtime error! Please help "Leanne" wrote: Hi All, Thank you all for your comments. I was hoping to make this file plug and play but I guess that will not be the case and I will have to install it on each computer myself - the users will not get it right! If only they were networked.............. "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#10
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
I am not sure...
What version of Excel is on your developers PC? What version of Excel is on the PC(s) you are having an issue with? Mark "Leanne" wrote in message ... Hi Mark, I did not have these checked on my development computer. What difference there is between excel is 2000 & 2003 version. I do not know what the other users will have but would guess they will be the same or newer versions. "Mark Ivey" wrote: Is there anything different about their version of Excel? Did they get a full install? You may need to get out the Installation CD and see if there were any features overlooked during install that may be causing a problem with this issue... One more thought... do you have both the basic Addins checked (Analysis Toolpack, and the Analysis Toolpack - VBA)? Reaching, but it may help... Mark Ivey "Leanne" wrote in message ... I have tried this but I am not to sure how to change the file path. When the first box comes up in edit it lets me chose the new location but then after entering the dates it gives me the following messsage [Microsoft][ODBC Excel Driver] and then the file path is an invalid path but will not let me do anything more. Either that or I get a runtime error! Please help "Leanne" wrote: Hi All, Thank you all for your comments. I was hoping to make this file plug and play but I guess that will not be the case and I will have to install it on each computer myself - the users will not get it right! If only they were networked.............. "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#11
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
Oddly enough the development pc is 2000 and the one I am having trouble with
is 2003 "Mark Ivey" wrote: I am not sure... What version of Excel is on your developers PC? What version of Excel is on the PC(s) you are having an issue with? Mark "Leanne" wrote in message ... Hi Mark, I did not have these checked on my development computer. What difference there is between excel is 2000 & 2003 version. I do not know what the other users will have but would guess they will be the same or newer versions. "Mark Ivey" wrote: Is there anything different about their version of Excel? Did they get a full install? You may need to get out the Installation CD and see if there were any features overlooked during install that may be causing a problem with this issue... One more thought... do you have both the basic Addins checked (Analysis Toolpack, and the Analysis Toolpack - VBA)? Reaching, but it may help... Mark Ivey "Leanne" wrote in message ... I have tried this but I am not to sure how to change the file path. When the first box comes up in edit it lets me chose the new location but then after entering the dates it gives me the following messsage [Microsoft][ODBC Excel Driver] and then the file path is an invalid path but will not let me do anything more. Either that or I get a runtime error! Please help "Leanne" wrote: Hi All, Thank you all for your comments. I was hoping to make this file plug and play but I guess that will not be the case and I will have to install it on each computer myself - the users will not get it right! If only they were networked.............. "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
#12
Posted to microsoft.public.excel.programming
|
|||
|
|||
query code failes on different PC
You should check to see if it was a full installation....
There may be some DLLs, OCXs, etc. that did not get installed on the other PCs. These files may be the answer as to why the calendar controls are not working. Did you get my email explaining how to set them up? Here is a link if you needed to look it over... http://www.graceba.net/~wmivey/Calendar_Controls.xls If these controls are missing from your "Additional Controls" list, then I would suspect that that particular PC did not have a full Office installation. Mark Ivey "Leanne" wrote in message ... Oddly enough the development pc is 2000 and the one I am having trouble with is 2003 "Mark Ivey" wrote: I am not sure... What version of Excel is on your developers PC? What version of Excel is on the PC(s) you are having an issue with? Mark "Leanne" wrote in message ... Hi Mark, I did not have these checked on my development computer. What difference there is between excel is 2000 & 2003 version. I do not know what the other users will have but would guess they will be the same or newer versions. "Mark Ivey" wrote: Is there anything different about their version of Excel? Did they get a full install? You may need to get out the Installation CD and see if there were any features overlooked during install that may be causing a problem with this issue... One more thought... do you have both the basic Addins checked (Analysis Toolpack, and the Analysis Toolpack - VBA)? Reaching, but it may help... Mark Ivey "Leanne" wrote in message ... I have tried this but I am not to sure how to change the file path. When the first box comes up in edit it lets me chose the new location but then after entering the dates it gives me the following messsage [Microsoft][ODBC Excel Driver] and then the file path is an invalid path but will not let me do anything more. Either that or I get a runtime error! Please help "Leanne" wrote: Hi All, Thank you all for your comments. I was hoping to make this file plug and play but I guess that will not be the case and I will have to install it on each computer myself - the users will not get it right! If only they were networked.............. "Leanne" wrote: Hi, I have the following code to refresh a query and it works fine until I install the file on another PC. Private Sub CommandButton1_Click() Sheets("Invoice Due").Activate Range("A7").QueryTable.Refresh BackgroundQuery:=False MsgBox "Refresh complete" End Sub It shows it failing on line Range("A7").QueryTable.Refresh BackgroundQuery:=False Can any one help? |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Code to query data | Excel Programming | |||
VB macro code for SQL Query | Excel Programming | |||
VB Code for MS Query | Excel Programming | |||
Code Query | Excel Programming | |||
query source code | Excel Programming |