Solved

Saving through vb

Posted on 2013-01-31
6
130 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
  • 4
  • 2
6 Comments
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
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
Comment Utility
No way to do it all via VBA, though?
0
 
LVL 45

Expert Comment

by:Martin Liss
Comment Utility
Macros are VBA so I assume from your first post that you can't use any code.
0
What Is Threat Intelligence?

Threat intelligence is often discussed, but rarely understood. Starting with a precise definition, along with clear business goals, is essential.

 

Author Comment

by:TIgerV
Comment Utility
I have previously been successful in running vba, just not macros recorded through the macro feature.
0
 
LVL 45

Accepted Solution

by:
Martin Liss earned 500 total points
Comment Utility
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 45

Expert Comment

by:Martin Liss
Comment Utility
I'm glad I was able to help.

Marty - MVP 2009 to 2012
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

What is a Form List Box? (skip if you know this) The forms List Box is the alternative to the ActiveX list box. If you are using excel 2007, you first make sure you have a developer tab (click the Orb)->"Excel Options"->Popular->"Show Developer tab…
Drop Down List with Unique/Distinct Values (Part II - ComboBox or ListBox and Data Validation List Bonus!) David Miller (dlmille) Intro This article focuses on delivering unique, sorted lists to list objects (e.g., ComboBox, ListBox) and Dat…
The viewer will learn how to simulate a series of sales calls dependent on a single skill level and learn how to simulate a series of sales calls dependent on two skill levels. Simulating Independent Sales Calls: Enter .75 into cell C2 – “skill leve…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…

728 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now