Webqueries and variables problem


I have a saved macro that queries the FT fund site to get some
financial data and it works great. however, as soon as I start to break
up the URL string and add my own variables to it, it stops working. Does
anyone know if I have to do something special to get this to work:

'Even with this small change it doesn't work where we are specifying
the day! -tried sDayGet as a string and a single

'With ActiveSheet.QueryTables.Add(Connection:= _
*& sDayGet &* "%2F07%2F2005&x=19&y=12" _
'    , Destination:=Range("E1"))
'    .Name = _

'this works

With ActiveSheet.QueryTables.Add(Connection:= _

, Destination:=Range("E1"))
..Name = _

..FieldNames = True
..RowNumbers = False
..FillAdjacentFormulas = False
..PreserveFormatting = False
..RefreshOnFileOpen = False
..BackgroundQuery = True
..RefreshStyle = xlInsertDeleteCells
..SavePassword = False
..SaveData = True
..AdjustColumnWidth = True
..RefreshPeriod = 0
..WebSelectionType = xlSpecifiedTables
..WebFormatting = xlWebFormattingRTF
..WebTables = "12"
..WebPreFormattedTextToColumns = True
..WebConsecutiveDelimitersAsOne = True
..WebSingleBlockTextImport = False
..WebDisableDateRecognition = False
..WebDisableRedirections = False
..Refresh BackgroundQuery:=False
End With

dazman's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=25903
View this thread: http://www.excelforum.com/showthread.php?threadid=392833

8/4/2005 9:31:13 AM
excel.misc 78881 articles. 5 followers. Follow

0 Replies

Similar Articles

[PageSpeed] 8


Similar Artilces:

having a problem with a combobox #2
not sure what you mean Dave. this is the code i have. perhaps it is the way it is created and save as CLng. I have tried different codes but none work. All the other comboboxes o the form work fine, but they all are alphabets. this is the only numeric. and the only on with a problem. on the initialize, it creates a new jobnumber in textbox1. and fills a combobox with jobnumbers created in the past. the form allows to create a new or open a past job. Private Sub UserForm_Initialize() Dim mydate As Date Dim wb As Workbook Dim rng As Range Application.DisplayAlerts = False Application.Scr...

Outlook 2003 send problem #2
I have seen any number of posts that indicate the following is a common problem. But I have not yet seen a solution, either here or on the Microsoft web site. If I have just missed it, I apologize in advance. Here's the problem. Outgoing mail. I do NOT have the mailer set to send immediately (I always want the option ot check an email again). SOME emails that show up in the out book are not italicized and have "None" listed under date. In the past versions of Outlook this would occasionally happen. The solution was simple: reopen the message and click "send" aga...

Problems with managed-unmanaged combination
Hi All, I have a piece of code that is a combination of managed and unmanaged portions of code. The unmanaged part throws an exception and then there is another unmanaged part that catches it. However after the call to the function (that throws exception) I notice in debugger that the call is made twice (after first time it throws an exception). I donot get why in a single invocation, if an exception is thrown, the parent stack would recall it.... Here is my code // This is the main project file for VC++ application project // generated using an Application Wizard. #include "stdafx.h&q...

problem with opening a money file <WEIRD>
I have used money 2005 for a year. Couple days ago I had to format my hard drive and install Windows XP a new. I saved my money mny file and the backup to it in the safe place. When I installed MS Money on my new system and tryed to open my mny file it displayed this error: --------------------------------------------------------------------- Money cannot locate 'filename' or cannot open it, possibly because it is a read-only file or you do not have permission to change it or your disk drive is write protected. If you have chosen the correct file and it cannot be accessed, you wi...

Can there be variable size columns in one report?
I want to create a report that has 3 sub-reports of different column widths. Is this possible? -The 1st sub-report has 1 column that occupies the entire width of the page -The 2nd sub-report can fit 2 columns in the page width -The 3rd sub-report can fit 3 columns in the page width Subreports can have any number of columns that don't have to be the same from one to another. Typically your columns should display across then down in order to render properly as a subreport. -- Duane Hookom Microsoft Access MVP "SheldonHinds" wrote: > I want to create a r...

Data transfer problem
I am working on a project that deals with two sets of information. M first set of information includes: A list of all the state abbreviations in the first column, the secon column has prices. E.X. AL (A1), AR (A2) ....and so on all the way through the 5 states. EX. $1.14(B1), $1.20(B2) ex--so AL has a price of $1.14, $AR has a price of 1.2 and so on... My second set of information includes: A list of state abbreviations, out of alphabetical order. I want to be able to merge these two sets of information around th prices. I do not want to go through the list and find each A abbrev...

Watching static class variables in Visual Studio C++
Why can't I use Watch window while debugging to view some protected static variables of my class? Why are only non static parameters visible to it? I am using MS VC 6.0. Thank you. cdr0@volcanomail.com wrote: > Why can't I use Watch window while debugging to view some protected > static variables of my class? Why are only non static parameters > visible to it? I am using MS VC 6.0. Try to enter the full name of variable: MyClass::myVariable. ...

Outlook problem with Norton AV
Hi all, I was wondering if someone knows how to resolve this problem. I had to backup my Outlook by just copying all of its files to backup drive. When I reinstalled my OS, I installed Norton AV, which was part of my new Norton System Works suite. I had corporate version of Norton AV before (because it was my work machine up to that point). So when I copied back Outlook files to its directory, the error started to come up that I am missing DLL for corporate NAV (that checks e-mail). Obviously I don't have that DLL, nor do I have corporate NAV any more. So, is there any way to stop Outlook ...

95 and 97 problem
For some unknown reason there is Excel 95 and 97 on this pc.When i double click on an Excel file, the pc defaults to the 95 program (Which incidently doesn't work properly). So my question is how do i get the pc to default to 97. Cheers Craig Craig, Have a look at Windows Help. From Windows 2000 Help (Index under Programs Associating with File Types) To change which program starts when you open a file In My Computer or Windows Explorer, on the View menu, click Folder Options. Click the File Types tab. In the list of file types, click the one you want to change. Click Edit. In Act...

Exchange 2000 mail routing problems
I have setup a second exchange server in my site and I am having problems getting mail to go from the the old server to the new server. Here is a little config info. Old server Exchange 2000 SP3 All SMTP mail is sent to a smart host New server Exchange 2000 SP3 Both servers are in the default routing group. I cand send mail from the new server to accounts on the old server. Looking for some help. Thanks Setup a connector instead and remove the smart host from the SMTP Virtual Server settings. -- Hope that helps, Dan Townsend This posting is provided "AS IS" with no warrant...

Accessing fields via variable
Hi In a table I have fields like field1, field2, field3 and so on. Is there any way for me to access these fields via variable like; I =1 to 10 "field"&str(I) = "some value" next Thanks Regards See: http://www.mvps.org/access/forms/frm0003.htm and add a bookmark to: http://www.mvps.org/access HTH -- Steve S -------------------------------- "Veni, Vidi, Velcro" (I came; I saw; I stuck around.) "John" wrote: > Hi > > In a table I have fields like field1, field2, field3 and so on. Is there any > way for me to access ...

Problem communicating with the MS CRM Server SFO client error...
Hi! Seen a few threads about the problem of the 'Problem communicating with the MS CRM Server'... 'Error Loading MS CRM functionality' error on Outlook 2003 and SFO. We have been hitting this on some clients, but not others - all clients are running the same base Windows XP2 image - we are running CRM 3.0 on Windows 2003, a Windows 2003 AD, although our clients are actually running Novell client 4.92 and authenticating primarily via Netware, and are not a member of the AD domain. The logged on user with profile is a local administrator of the PC. I believe I can remove Novel...

Problems with Error 3021
Using VB6 - SP5 MS Access (MDB) data file. I'm having problems with Error 3021 "No Current Record" error. I have reviewed the code - every .Update statement is preceded by either a ..AddNew or a .Edit. In an attempt to find where this is occurring, I have every instance of data file access (seek/read - edit - addnew - update) surrounded with a "On Error GoTo" structure which will log the error to an event log that is already part of the program. But the program has crashed several times (with Error 3021) since that trapping was added. I just read KB10649...

Randon OWA Access Problems
Hello, We have been using OWA for about 2 years now and we have never had a problem. Then, this weekend, certain users were unable to access their mailboxes while others were fine. For the users who couldn't get in, it would ask for there username and password 3 or 4 times and then give them the following error "HTTP/1.1 401 Unauthorized". I have checked all settings and permissions and everything seems to be fine. AD objects for those users are configured correctly and the IIS and Exchange Servers have been restarted. Any ideas would be greatly appreciated. Craig ...

CFileDialog problem (in MFC DLL)
I'm having a problem with CFileDialog being called from a button on a dialog in my MFC-DLL. the sripped down code looks like: CFileDialog dlg (TRUE, kDefaultFilter, NULL, OFN_EXPLORER|OFN_HIDEREADONLY | OFN_FILEMUSTEXIST, kFileFilter, NULL); dlg.m_ofn.lpstrInitialDir = "C:\\path"; dlg.m_ofn.lpstrTitle = "Tile"; if (dlg.DoModal() == IDOK) { .... } On the first time this is called it works as expected. One the second time called it automatically opens the first file in the default path. If I don't set the initial directory then I don't see thi...

Problem Adding Records To Child Table
I have two tables: table A (parent) and table B (child) which have a one-to-many relationship. Fields A.1 and B.1 are both the primary key fields of tables A and B, and each is an autonumber field. Field B.2 is the foreign key field which links to field A.1. I have a query with SQL as follows: SELECT B.*, A.1, A.2 FROM B INNER JOIN A ON B.2 = A.1 ORDER BY B.1 When I open the query and go to the new record, I enter in B.2 the value for A.1 for one of the existing A records. The new record is added in the B table. No problem. However, when I base a form on the above SQL and then try to add a...

Regional setting problem
Hi, I have some problems with the localization, my computer is set to accept ',' (comma) as a decimal symbol but when I use the strtod, ecvt and even printf functions are still using the '.' (dot) as the decimal symbol in contrary to the documentation. can any one enlighten me? thanks in advance Iris Irisz wrote: >Hi, > >I have some problems with the localization, my computer is set to accept ',' >(comma) as a decimal symbol but when I use the strtod, ecvt and even >printf functions are still using the '.' (dot) as the decimal symbol i...

SqlTransaction Problem
Hi all In my web application I have following code: SqlConnection con = new SqlConnection("Data Source=.;Connect Timeout=15; Initial Catalog=SaamicAcc1;Integrated Security=True"); SqlCommand com = new SqlCommand("",con); com.Parameters.AddWithValue("@A", "somevalue"); com.CommandText = "Insert into Test (Name) values (@A)"; con.Open(); com.Transaction= con.BeginTransaction(); // con.EnlistTransaction(com.Transaction); com.ExecuteNonQuery(); Session["con"] = com.Transaction; Response.Redirect("d...

Excel selection problem
Has anyone any solution : from time to time I find Excel locks on a cell, the fill handle disappears and no amount of clicking will drop the selection -it is as if there is glue on the cursor!. I try every combination of Ctrl, Shift, Alt etc I can think of but it makes no difference. Windows will not close the program and only shutting down and re-starting solves the problem. I do not believe this is just a hardware problem -I have had it on at least 2 different machines. Between events the mouse works OK (& I've just realised it has ocurred with 2 different mice) . I thought ...

Multiuser locking problem...again.
I have the now almost ‘standard’ problem with multiuser access and have I scoured the internet for a solution, but with no luck to date. Please help! Problem: Once one user has access to the tables, another user is prevented from accessing those tables, until the first user leaves. I have the following setup: PC1: Front end (client) database with forms, reports, queries and a couple of local ‘temporary’ tables. PC2: Front end – same as PC1 (client) database with forms, reports, queries and a couple of local ‘temporary’ tables. The back end database of just tables resides on PC1 in a sh...

RPC-over-HTTP problem
Hello! I have asked this before, but i didn't find a soloution at that time. Whats nessesary to do to be able to save the Outlook password when connection using RPC-over-HTTP(s)? TIA! /Magnus ...

Problem setting up Displays for Contacts and GAL
We are running Exchange 2003 on a pure Windows Server 2003 domain with 100% XP Professional clients. Some of the workstations are running Office XP, some are running Outlook 2000. All workstations and servers have been fully patched to the most current updates via Windows Update and Office Update. Here's my problem. Let's say I have a Contact named "Joe Doakes" who has both a business and a personal email. Pursuant to the Microsoft design model, I keep only one Contact for both and, depending on the nature of the contact, I update the email field with the primary (business o...

Log Shipping Problem -Last Backup File and Last_backup_date
The above two columns in table log_shipping_primary_database dont appear to be getting updated with the latest trans log backup information causing alerts. The trans logs are being backed up copied and restored sucessfully to the secondary database. Somethings out of sync but the information in the logshipping tables looks OK. Any ideas on how to jumstart the updating of these two columns? thanks Hi Tom, For diagnosing the cause of this issue, I need your help on collecting the following information first: 1. Your SQL Server Error Logs which are located at %ProgramFiles%\...

Copy named range based on variable
Is it possible to copy a named range based on a variable? I have a number of named ranges which I need to copy based on the results of a cell value. My whole routine is nearly 500 lines of code, so I've only included the relevant bits in this message. For example, I have the following lines at the start of my routine: With Worksheets("Lookup") Set MTS215Vision30 = .Range("MTS2.16Vision30") Set MTS216Vision30 = .Range("MTS2.16Vision30") End With and want to copy one of these based on the value of cell which could currently co...

Problem deleting records
Hi When I try below query; DELETE Table1.* FROM Table2 INNER JOIN Table1 ON Table2.[ID] = Table1.[ID]; I get the error 'Could not delete form specified tables'. What am I doing wrong? Thanks Regards Try a subquery instead of a join. Example: http://allenbrowne.com/subquery-01.html#DeleteUnmatched -- Allen Browne - Microsoft MVP. Perth, Western Australia Tips for Access users - http://allenbrowne.com/tips.html Reply to group, rather than allenbrowne at mvps dot org. "John" <info@nospam.infovis.co.uk> wrote in message news:#m...