How To Make A Data Miner Auto-refresh A Page That Fails To Load

Feb 6, 2009

I'm in the process of continuing to build this babe (very slowly, as I have limited programming knowledge), and I wondered if there was a way to modify this code to make it refresh the data page if a server's page fails to load.

Part of my code is something like this, the first part being just the pseudo log on script.

Especially when there are over 50 pages to grab, the chances of one of the pages failing to load is VERY high, and this macro stops at the "Refreshbackground=False" command.

Is there a way to trigger a "refresh" once it fails?

View 10 Replies


ADVERTISEMENT

Pivot Table Refresh With VBA Fails

Dec 12, 2007

I am having trouble getting visual basic to update a pivot table.
(using manual refresh on the same pivot works just fine).

I have recorded a macro of the manual procedure, but it fails to work when used in a visual basic program:

ActiveSheet.PivotTables("PivotTable2").PivotCache.Refresh

I have tried using code presented elsewhere in these forums
eg http://www.ozgrid.com/VBA/pivot-table-refresh.htm

but the table stubbornly refuses to update.

The pivot's source data range is dynamic and works fine.

I think I'm missing something obvious or I have have a bug.

View 9 Replies View Related

Protected Sheet - Macro To Unprotect, Refresh Sql Query & Re-protect Fails

Feb 21, 2007

I have a protected worksheet containing an SQL query. I have two cells on the worksheet unlocked so that users can enter fresh parameters to feed the query.
Because I have to use MS Query to interrogate our SQL server (current IT decree), the query won't support parameters directly when the query cannot be represented graphically - so I have to manually edit the sql command text and then refresh the query - or at least that was why I wrote the code below

The problem: My macro won't unprotect the sheet before it calls the SQL.it therefore won't update the sheet to detail the DSN, command text and number of parameters (latter should be 0) - info just used to verify queryit won't run the query / return the data as the sheet is still protected Comment: I have had to remove sheet protection in order to allow the sql to execute and return data. If protection is removed, the query does execute and return data ( changes in the "parameter" cell contents do cause the query to be correctly modified)
I could comment out the debug info but the query still doesn't return data if the sheet is protected.

Activesheet And worksheets(ndx) where ndx has been defined As ActiveSheet.Name
I apologise If my post Is difficult To follow - especially the code.

Sub AgedStockParameters()
nmb = ActiveWorkbook.Name
ndx = ActiveSheet.Name
Workbooks(nmb).Activate
Worksheets(ndx).Activate
ActiveSheet.Range("A1").Select
WkshtQryCon = Workbooks(nmb).Worksheets(ndx).QueryTables(1).Connection
ActiveCell.Value = WkshtQryCon
Range("A2").Select
WkshtQryFld = Workbooks(nmb).Worksheets(ndx).QueryTables(1).CommandText
ActiveCell.Value = WkshtQryFld.......................

View 2 Replies View Related

Auto Refresh Data In Pivot - Macro

Mar 14, 2008

I see some code on the forum on how to automatically refresh pivot tables in excel. I know to press alt + f11, but where do I go from there to put the code in? Also, what if I have several pivot tables in the spreadsheet, is there anyway to refresh all of them automatically?

View 9 Replies View Related

Data Load (search And Load .csv Files Automatically In Workbook)

Dec 16, 2002

I need to do a macro that will open a search window, the user would select a folder and it will search for a .csv file within it. Then after locating the file, it would automatically load it into a specific sheet in the workbook.

View 9 Replies View Related

Why (Wait For Page To Load) Fail

Jan 29, 2014

If I run this in the editor sometimes it works and sometimes it does not.
If I run this in editor with F8, stepping through the code, it does work.

I can only guess that enough time is passing during the F8 presses that the page can load. But is that not the purpose of adding the wait code?

[Code] ....

View 9 Replies View Related

Load Page Breaks For A Range In Array

Jul 13, 2014

Is it possible to load the page breaks for a range into an array without looping. Just checking, because looping is taking about 20 seconds or so.

Doesn't Work.

[Code] .....

Works but takes a second

[Code] ......

View 2 Replies View Related

Auto Sort From Data Page?

Jun 12, 2014

I have a spreadsheet that I am running for world cup score predictions where people predict the result and depending on right users score sheet when I update the actual result workbook it gives them either 3 points for the right result or 1 point for the correct winner or draw of a different scoreline. All this data then feeds through to a league table of the current points.

How I would modify the macro below that when i enter the game scoreline it will automatically sort the league

This macro is currently on the league worksheet but I am guessing I need a macro on the results worksheet as well to activate this

Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Then
Range("A2:D23").Sort _

[Code].....

View 1 Replies View Related

Auto Update Of Data To Web Page

Aug 17, 2008

I did try a search before posting this - either I am too stuipid or the info was a bit too cpmplicated and in bits and peices for me to figure out. My query is this
Lets say I have a workbook with around 10 sheets in it. and I have a saved a copy of the sheet ias a webpage (HTML ) for user convinence. Now is it possible to somehow ensure that when the orginal workbook is updated then this webpage would also get updated - both would be in the same drive ( I dont want to use internet for this purpose)

View 2 Replies View Related

Macro To Auto Load A Lookup

Oct 24, 2009

I have a worksheet called "City State Matrix" this contains two columns 1) Location which has the names of cities and 2) State - that has the names of appropriate USA States

I have another worksheet (called Data) and I if I enter the location into Column C of that worksheet I want to auto load the state (based on the data stored in the "City State Matrix" worksheet) into column M (State) of the worksheet called "Data"

View 9 Replies View Related

Import Data From Access Table To Pivot Table - Enable Auto Refresh

Feb 1, 2010

I have enable Refresh on Open for my excel pivot table, but user need to click "Enable Automatic Refresh" , only solution i came across is to change the registry setting. Which i dont have access to edit registry(admin disable the access).

Alternate solution i try to use Access macro to automate the process and use Outputto save it as a excel file A. Then use excel file B to update pivot table from excel file A.(as excel A data is always latest)
The problem is i will get "....A file name already exist...do you want to overwrite.." prompt.
Which defeat the automate process.

Any other solution to enable the automatic refresh on open the excel workbook?

Or Access can overwrite the exist file or save it as another file name with timestamp ?

View 14 Replies View Related

Refresh IE Object Values To New Page (VBS Excel Macro)

Feb 8, 2013

My doubt it's at the final of the code when the condition If IE.Document.URL Like constantsValues.urlLoginData Then is true, it enter into a class an introduce the user and password from a login page AND then the page is REDIRECTED to another page SO when it goes out the IF CONDITION, the values that I had at the beginning in the IE Object are now DIFERENT because I'm now in a new page.

So that's why I put Application.Wait for 30 seconds, and then try to refresh the values of the IE object and get the new ones, but it always get the first values (the values of the login page :S) NO the new ones :S

How can I update the IE object to get the values of the actual page?

Code:
Private Sub runMacro_Click()
Dim constantsValues As CConstants
Set constantsValues = New CConstants

[Code].....

View 1 Replies View Related

Being Able To Refresh Data- So That When I Hit Refresh It Gets Info Frm Another File

Jul 27, 2006

i have an excel spreadsheet with 27 or so workeets. it contains sales figures in it.
I want to be able to link mutiple cells of this workbook to another workbook so that it retreives that data, So that when I hit the refresh (!) button it will automatically put the data in. I will recieve new sales figures (new files) on a monthly basis so i want it to be able to update the figures to the new figures.

View 4 Replies View Related

Detect Auto Refresh In VB And Run A Macro

May 22, 2006

My Excel spreadsheet is linked to an Access database to Get external Data. When the data is periodically refreshed ,while the spreadsheet is open, I need to automatically detect it so that a macro can be run each time to format the new data.
The Excel data is not a pivot table. The spreadsheet is for display of data only (no user updating).

View 5 Replies View Related

Auto Refresh Published HTM HTML

Aug 6, 2007

I have a worksheet which holds data and formula (obviously) and publishes only the data in a htm file to be viewed by others using a browser (IE). I want the htm file to auto refresh for the viewer.

View 8 Replies View Related

Auto Refresh Filter In Protected Sheet?

Jan 11, 2014

I have a summary sheet that pulls data from several worksheets. I have a filter on column I that hides all rows that have zero values in that column. Once I protect the sheet I cannot get the filter to update as the source data changes. I have tried other macros from forums but I cannot get them to work. I would like the filter to update every time that the workbook is calculated.

View 2 Replies View Related

Auto Refresh Table (Import From Website)

Jul 12, 2014

I import a table from a website and its work fine.

My question is, Is there any macro or formula to highlight the cells after the update process (only if the value changed) ?

Also i need new entries to add automatically at the bottom(below the last row).

Sample table:
Data1
5

Data2
6

Data3
4

View 1 Replies View Related

Auto-Refresh AutoFilter With Sheet Protection On

Nov 23, 2008

I found one of your old VBA entries that allowed me to automatically refresh an autofilter function, and it works great.... with protection off.

As soon as I protect the sheet so users can't enter data into the pages showing the autofiltered data, the autofilter kicks off.

i have set the protection to allow autofiltering, so it's something that is preventing the macro (for automatically updating/refreshing the autofilter).

I'd love to either fix the macro to "autorefresh autofilter" with protection on, or just enter another code that will disable all functionality on the worksheet. (workbook is set up with multiple sheets, first sheet is for all data entry, subsequent sheets are filtered data-trying to make them viewable only).

View 9 Replies View Related

Enable Auto Refresh Of Web Queries When File Opened

Sep 22, 2006

I have a special use PC which will power a projector 24/7. When it reboots I want it to load Excel, open a spreadsheet, and then connect to the web to get data using web queries.

My problem is that I get a dialogue box each time the spreadsheet is opened: "Enable Automatic Refresh." I need to remotely reboot the PC from time-to-time so I can't click the button.

I have set my security levels to low and that does not help.

View 5 Replies View Related

VBA Code To Auto-expand Columns When Pivot Tables Refresh

Mar 30, 2013

I have 2 drop downs that when changed, auto refresh all pivot tables. My problem is getting the columns to auto-adjust based on the refresh or change of the data in the pivot table. Listed below the code I have thus far for the auto-refresh on pivot tables. How to auto expand all columns simultaneously.

The pivot tables are based off of tables on a different sheet(TOS Tables). So the code listed below is in the table sheet, not the pivot table sheet (TOS Customer Level). So followup question will be, which sheet to put the auto-expand columns code?

VB:
Private Sub Worksheet_Calculate()
'If data on this worksheet changes, refresh the pivot table
Sheets("TOS Customer Level").PivotTables("PivotTable2").RefreshTable
Sheets("TOS Customer Level").PivotTables("PivotTable5").RefreshTable
End Sub

View 3 Replies View Related

Make Row1 The Top Line On Every Printed Page

Nov 1, 2009

is it possible to make row 1 the (headingline) top of every printable page? office excel 2007 by the way

View 3 Replies View Related

Lookup Make (on Another Page Of That File) Where I Input The Month And Date

May 31, 2009

My table is the equation of time (EoT) (sundialist's jargon). It shows each day of the year if the sun is running fast or slow according to the clock. I need to make (on another page of that file) where I input the month and date. It will then till me the time it is fast or slow

View 5 Replies View Related

How To Make A Single Sheet Print Multiple Page Numbers

Sep 18, 2013

I have a workbook that has a single sheet in it, in cell G2 I want to insert a page number where if I print of multiple copies on the first sheet it will say 1, the second 2, the third 3 and so on and so forth.

I have never written any codes for Excel.

View 4 Replies View Related

External Web Data Query Fails To Insert Table Data?

Jul 9, 2014

An external data web query points to a web site that offers a foreign exchange rate calculator. In my browser, I selected the specific currency pair I need and used the resulting url in the web query. The "New Web Query" pane resolves the url correctly and allows me to select the table data I want (the little yellow arrow turns to a green check mark). However, when I hit "Import" and select the target cell, the only data returned is the parameters from the url and an error msg (This web query returned no data...). How do I get the query to pass the parameters to the website correctly?

View 3 Replies View Related

Auto Adjust Page Area

Mar 14, 2014

On my billing/table of contents sheets, there's an imaginary thick blue line that surrounds the bottom/right side of my chart, and everything outside it is grey/non-existent. I can click and hold this blue line to expand it over other cells to make them 'appear'. I have no idea what all of this is called.

The amount of columns I use for each sheet is static, but the amount of rows varies with each job. As it stands, I have to raise/lower that blue line every time I have new data. Is there any way to force this line to move up or down depending on the existence of data in cells automatically?

View 3 Replies View Related

Countif Formula: Take Data From One Page And Graph It On Another Page

May 1, 2009

I am looking for a formula that will take data from one page and graph it on another page. The data I am trying to graph is arranged like so:

A B

1 q 2009.05.01
2 w 2009.05.02
3 w 2009.05.01
4 q 2009.05.01

I am looking for something that will look at column A and if the answer is "q" and then look at column B and if the answer is "2009.05.01" Excel will take that and count it in a specific cell on another page. In the case above, I want Excel to give me the answer of "2" in a designated cell.

View 3 Replies View Related

Transfer Specific Data On Each Page To A Different Colum On That Same Page

Mar 15, 2007

I have a workbook that has 9 different tabs in it. Once all the information has been completed throughout the workbook, is there a code that could transfer specific data on each page to a different colum on that same page? I need to do this for 9 pages at one time. The information is listed differently on each page. I need to transfer data from the current data column to the previous data column once the entire workbook has been filed out.

View 2 Replies View Related

VBA To Auto Select Last Populated Print Page

Feb 19, 2014

I have a sheet that already has page breaks set at specific intervals to ensure the data is displayed in a certain way on print, I can only have whole pages. The variable is how many pages are printed on each project, which can be anything between 1 and 20 or more. I have a few columns that contain line numbers, and formulae down the entire length of the sheet, so a basic last populated cell search won't work, but the column I'd like to focus on is Col F, which only has blank/empty cells below the last used one in use. Is it possible to have a BeforePrint code find the last populated cell in Col F and simply capture which print page number it is in, and set that as the number of pages to print?

So in summary, I'd like to be able to just hit Print, and the code will automatically set the number of pages to print based on which page contains the last populated cell in Col F.

View 2 Replies View Related

Auto Page Number Tabs In A Spreadsheet

Dec 3, 2007

I am interested in printing an entire workbook in one shot with multiple tabs, where each tab is one page. I would like to print the tabs such that the first tab has the number '1' in the footer, the second tab has '2' etc. And I don't want to go into each tab and type the number in the footer.

Does anyone know how to easily make this happen?

View 6 Replies View Related

Auto Page Field Changing In Pivots

Sep 13, 2006

I have used the archive and Mr Excel and cobbled together a code which does what I want - that is to use a remote cell entry to update a specific page field cell in 4 pivot tables. I then use another remote entry to do the same to two secondary Page Field Cells in 2 of the 4 pivot tables.

However, if my remote cell has a number in it that IS NOT in the the pivot Page Field List then rather than breaking the code it simply overwrites (and therefore changes the value in the pivot table Page Field List) - disaster!!
My code is

Sub testflash()

Range("B15").Activate
Dim mycell As Integer
mycell = Range("b15").Value
Sheets("Dissection Table").Select
ActiveSheet.PivotTables("PivotTable21").PivotFields("Serial Number").CurrentPage = mycell
ActiveSheet.PivotTables("PivotTable22").PivotFields("Serial Number").CurrentPage = mycell
ActiveSheet.PivotTables("PivotTable23").PivotFields("Serial Number").CurrentPage = mycell
ActiveSheet.PivotTables("PivotTable24").PivotFields("Serial Number").CurrentPage = mycell
Application.Run "'KPI Mastercopy Data.xls'!testing"
End Sub

View 9 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved