Macro update

  • Thread starter Thread starter Rhonda
  • Start date Start date
R

Rhonda

I have a question about a work project I am working on.
My superisor wants me to somehow create a spreadsheet in
excel that would automatically retrieve values about
printer meters from a browser and then only allow the
values to be updated once a month. Then he wants these
values archived for data processing. He wants it set up
so there is no need for human intervention to prevent
careless data entry errors. All of the printers are Xerox
which come with a software package that allows you to
monitor printer meters online. How is it possible to do
that?

Right now I have the sreadsheet set up with a macro. I
recorded a macro that would perform web queries and store
the data in a seperate worksheet in the same workbook.
Then I linked the corresponding value back to the
spreadsheet. The problem with this is, how could I code
it to just refresh itself once a month and then archive
the data. I haven't done anything like this ever and I
don't know how to work it.

Thanks for your help.

Rhonda Carroll
 
You can use the Windows Scheduled Tasks applet (under Accessories, System
Tools) to "run" an Excel file. All you need to do is direct the applet to
the XLS and set up a schedule. (I'd schedule it for when no one is using
the machine.) Windows will fire up Excel and open the workbook.

Now your macro will have to be set up to run automatically when the workbook
opens. To do that use the Workbook_Open event in the ThisWorkbook module:

Private Sub Workbook_Open()
MyQueryProcedure
End Sub

I don't know what the boss means by archive; perhaps just save a copy of the
workbook somewhere. Your macro can do that too I suppose.

Then there is the question of error trapping. What if something goes wrong,
like the network is down? Sorry, have to run<g>.
 
Back
Top