Solved

Saving through vb

Posted on 2013-01-31
6
131 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 46

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 46

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
Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

 

Author Comment

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

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 46

Expert Comment

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

Marty - MVP 2009 to 2012
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
excel 2016 program to loop through scripts 6 33
Dynamic Excel Input Form 29 32
Excel Spacing Anomaly 4 22
Excel IF formula 3 19
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
This Micro Tutorial will demonstrate on a Mac how to change the sort order for chart legend values and decrpyt the intimidating chart menu.
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…

774 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