Im trying to use excel as part of an real time display system, what im looking to do is after xx time period import some data (which is fine, I have that bit sorted), then save to as html- (hopefully using excel 07 abilty to repubish data to update the same file with more info).
so far I have found the following code, but could do with a hand to tie it all up!
Code: Public Sub Watchon() State = "Mointoring Folder..." Timerun = Now() + TimeValue("00:10:00") Application.OnTime Timerun, "DetectNewFiles" Userform1.Nextupdate.Caption = ">Next Update will be @: (" & Timerun & ")" With ActiveWorkbook.PublishObjects.Add(xlSourceSheet, _
Code: Sub DetectNewFiles 'Some code to import text files to excel With ActiveWorkbook.PublishObjects("Book1_24990") .Publish (False) .AutoRepublish = True End With
Some code to reset next time update of DetectNewFiles
Now I have all the data i require (for a bus punctuality log) im looking to compile all the results into 1 page but just not sure how exactly I would go about doing it. these results will be published to the media on 11th March.
As you can see from the "halfway results" all the data entered is hand entered and I was looking to do the final results in a similiar way, with having each bus number and having the amount of submissions made on that bus, how many times it was late and early, amount of total mins it was late, amount of total mins it was early and a average on how late it was etc. I also want to be able to add the total lateness of all the buses submitted on the spreadsheet (I can do that already).
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).
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.
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?
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).
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
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?
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 ?
I have a query with ODBC connection to a SQL database. This query's parameter is linked to a cell. The resultant data is the source for a pivot table. I want to refresh the pivot table, when the query is run. I've tried using the cell that triggers the query....but the problem is that the query takes about 10 seconds to run. By the time the query returns new data....the pivot has already refreshed. I need it to refresh AFTER the query is complete.
I tried adding a cell that sums up the data from the query...thinking when THAT changes (due to updated data), to trigger the pivot refresh. Problem is that I don't know the trigger for when the sum cell changes (ie....formula change, not typed in.)
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.
I've got a spreadsheet with a few queries to extract data into my sheet. Whenever I open the spreadsheet, I get a "query refresh" dialog box, asking if I want to "Enable automatic refresh". I keep clicking on the "Enable" button but I have to keep answering the question for each open. Isn't there a way to set "yean - ok - refresh the data" so that I don't have to keep saying "yes"?
How can I using VBA do HTML scraping? A site which I have to use to update some data on a spreadsheet does not offer any web services. I have to copy data from the spreadsheet one cell at a time, paste into the search field and look at the results and decide what kind of modification is needed for that piece of data.
If VBA can do HTML scraping here is what I thought I could do. For each of the data in the cell, I need to go to a search field on a website, manually enter the values and hit search. Then the browser generates a url like "http://www.mysite.com/search?hl=en&q=SNX018923" and returns the result as an HTML page. How can I use vba so that I can automate this process of generating the url and load the returned html text into a variable. Then I can use the script to search for a pattern of text and do something to the active cell from where the data was taken. *nix has a curl command. What is the equivalent of curl in VBA? How do I use it to get the result I am trying to acheive?
Below I have my code that works great. What I would like to do is make it pull the .HTMLBody from a cell value instead of inbeded in the code so users can change, just like to I have it below for who I am sending it to. The issue is if I do it the same way I loose my signature and the font, size and color I have below. How can I do this.
range("P16") would be the 1st line of the mesage range("P17") would be the 2nd line of the mesage range("P18") would be the 3rd line of the mesage
All the sendkeys below copy a range and paste it below my message as a picture currently. That is fine.
So I have this code I'm working on for my deptarment that goes to a website inputs data , clicks run and downloads the csv file to the worksheet. It works just fine on my PC and on my profile on the computers the other department uses. We are both using same versions of windows, excel , and IE. When i have someone from the other department run the macro it opens the website but never enters the data into the fields despite the site being the exact same coding as when i'm logged in.
When this code is ran by a member of the other department it just opens the website inputs nothing and doesn't press the RUN button on the website.
What setting or anything. I verified that both PC's VBA references in are there and no "Locations are missing paths" .
I have wriiten a macro in excel that pops up some photos whenever the respective cell is selected. It is working good except when I save the file in HTML format. Also what is the difference between publishing and saving html file? I am using office 2003 and microsoft web components installed.
I have a couple spreadsheets which update using a RTD link. I then use Macros to sort it and publish a html file every 30 seconds.
I found the html macro thanks to : http://www.meadinkent.co.uk/xlhtmltable.htm
The problem is that whenever I run two sheets together, the macro that creates the html file at times gets the data off the wrong worksheet. Sometimes I only see one sheet's data being used, sometimes the other.
Both html files when published have some feature from one macro and some from the other macro. Like macro one sheet says use 1528 rows and the title for page is Relative Strength Over 750K. Other macro says use 979 rows and title for page is Relative Strength Under 750K. I would have both the sheets as like 1528 rows for with title Relative Strength Under 750K.
If I run one sheet at a time, everything works fine.
Here are the Macro codes for Sheet #1:
Private Sub Workbook_BeforeClose(Cancel As Boolean) Application.OnTime dTime, "Macro1", , False End Sub
Private Sub Workbook_Open() Application.OnTime Now + TimeValue("00:00:30"), "Macro1" End Sub
i.e. <DIV class=productdesc> <H3>SCALLYWAGS CHANGING MAT. </H3><TABLE border=0> <TBODY> <TR> <TD> <UL> <LI>Foam-filled <LI>Wipe-clean surface <LI>Fits most dressers <LI>dimensions: 75 x 46cm </LI></UL></TD></TR> <TR></TR></TBODY></TABLE> <UL> <LI>When using a changing mat on a dresser or other raised surface, never leave your baby unattended even for a moment </LI></UL></P></DIV>
I want it to read:-
SCALLYWAGS CHANGING MAT. Foam-filled Wipe-clean surface Fits most dressers dimensions: 75 x 46cm When using a changing mat on a dresser or other raised surface, never leave your baby unattended even for a moment
I am trying to change out website csv file into a froogle csv file but without the HTML
is it possible in Excel to read value from url every 5 mins.
this html url has a time which is updated every 5 mins, I want excel to read that time from that url every 7 or so mins. so after that I can write another code if time didn't change it will notifity me or do whatever I need to do after that.
I have a html file that is pulled into excel. It has several values like list below. I need the zero value to be blank. Is there a quick macro that I can run to get them to change over to blanks? I tried formating but that didn't work.
A B C D E F 1 35,080 0 128 2,028 0 0 2 20,586 124,680 0 25 228 342 3 1,425 125,879 22 0 0 0 4 0 0 0 0 0 0