Solved

Saving through vb

Posted on 2013-01-31
6
134 Views
Last Modified: 2013-02-01
I have a spreadsheet (larsonator.xlsx) which imports new data every 5 minutes from a web site.

What I would like to do is save the data out to a .CSV file (tiger.txt) every 5 minutes.  It does NOT need to coincide with the import.

(I really only need the first line to export)

I was trying to do it with macros, but alas, my IT department has a GPO that prevents macros.  I've been successful with running vb, however.

Is there a module I could add to save the file automagically without input?

Thanks!
0
Comment
Question by:TIgerV
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 2
6 Comments
 
LVL 47

Expert Comment

by:Martin Liss
ID: 38841304
You have to use at least some VBA. At a minimum

Application.OnTime ….

with some parameters and a macro to do the SaveAs.
0
 

Author Comment

by:TIgerV
ID: 38841312
No way to do it all via VBA, though?
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 38841338
Macros are VBA so I assume from your first post that you can't use any code.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

Author Comment

by:TIgerV
ID: 38841352
I have previously been successful in running vba, just not macros recorded through the macro feature.
0
 
LVL 47

Accepted Solution

by:
Martin Liss earned 500 total points
ID: 38841399
Okay then record a macro that does what you want and change it from

Sub Macro1() 

' code

End Sub 

Open in new window

to

 Private Sub MyMacroName() ' This can be Private or Public

' code

End Sub 

Open in new window


and then look up how to use OnTine if you don't know already.

If the code is still caught as a macro, which I doubt will happen, cut the code out of the sub,
create a new sub manually and paste the code.
0
 
LVL 47

Expert Comment

by:Martin Liss
ID: 38844377
I'm glad I was able to help.

Marty - MVP 2009 to 2012
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial demonstrates how to create Excel charts: column, area, line, bar, and scatter charts. Formatting tips are provided as well.
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.

729 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question