Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 144
  • Last Modified:

Saving through vb

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
TIgerV
Asked:
TIgerV
  • 4
  • 2
1 Solution
 
Martin LissRetired ProgrammerCommented:
You have to use at least some VBA. At a minimum

Application.OnTime ….

with some parameters and a macro to do the SaveAs.
0
 
TIgerVAuthor Commented:
No way to do it all via VBA, though?
0
 
Martin LissRetired ProgrammerCommented:
Macros are VBA so I assume from your first post that you can't use any code.
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
TIgerVAuthor Commented:
I have previously been successful in running vba, just not macros recorded through the macro feature.
0
 
Martin LissRetired ProgrammerCommented:
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
 
Martin LissRetired ProgrammerCommented:
I'm glad I was able to help.

Marty - MVP 2009 to 2012
0

Featured Post

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

  • 4
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now