Excel macro

Find a developer for your Excel triggered betting needs and advertise your development service here.

Moderator: 2020vision

Excel macro

Postby TheGoldenVision » Sat Mar 01, 2008 11:38 am

Could anyone please help me write a simple macro to "SaveAs" the current worksheet on screen. The file would need to be saved as per the race info?

Example

SaveAs "C:/RaceSaves/Kempton2.20.xls"

Can't workout how to automatically get the macro to save with the race venue/time.

:?
TheGoldenVision
 
Posts: 34
Joined: Sat Nov 19, 2005 10:48 pm

Postby KevinTHFC » Wed Mar 05, 2008 7:31 pm

Code: Select all
ActiveWorkbook.saveas Filename:="C:\RaceSaves\" & Cells(1, 1).Value & ".xlsm", FileFormat:=xlOpenXMLWorkbookMacroEnabled, CreateBackup:=False


Easiest way to learn these things is to turn on the macro recorder, do the action you want the code for, stop the recorder and look at the code.

The example above will save a file named as the contents of cell A1 with a .xlsm extension into the directory C:\RaceSaves

If cell A1 contained Kempton 2.20 then you would get exactly what you want.

Kevin
KevinTHFC
 
Posts: 72
Joined: Fri Aug 25, 2006 9:08 pm

Postby TheGoldenVision » Wed Mar 12, 2008 1:53 pm

Kevin

Sorry for the delay but many thanks for your help. It works a treat :lol:
TheGoldenVision
 
Posts: 34
Joined: Sat Nov 19, 2005 10:48 pm

Postby KevinTHFC » Wed Mar 12, 2008 7:22 pm

No probs Mate.
KevinTHFC
 
Posts: 72
Joined: Fri Aug 25, 2006 9:08 pm


Return to Find an Excel developer

Who is online

Users browsing this forum: No registered users and 10 guests

Sports betting software from Gruss Software


The strength of Gruss Software is that it’s been designed by one of you, a frustrated sports punter, and then developed by listening to dozens of like-minded enthusiasts.

Gruss is owned and run by brothers Gary and Mark Russell. Gary discovered Betfair in 2004 and soon realised that using bespoke software to place bets was much more efficient than merely placing them through the website.

Gary built his own software and then enhanced its features after trialling it through other Betfair users and reacting to their improvement ideas, something that still happens today.

He started making a small monthly charge so he could work on it full-time and then recruited Mark to help develop the products and Gruss Software was born.

We think it’s the best of its kind and so do a lot of our customers. But you can never stand still in this game and we’ll continue to improve the software if any more great ideas emerge.