Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Save as cell with path
I am working file that will generate invoices and then delete its information and the macro to make it smaller and simpler for email. There are a few tricks I cannot seem to accomplish and I was hoping to get some help. The file takes the data from a website via copy and paste then pulls the nessecary data from a few sheets in the workbook. Then there is a button to run the macro which does the following: - Replace the invoice formulas with the values itself - Done - Delete the now unnessecary (3) sheets leaving only the invoice - Done - Delete the Button used to run the macro - Done - Save as a filename in a particular cell in a particular subfolder - Partial - Have the macro delete itself - Done The issues are the subfolder, it will save in "My Documents" as the cell reference, but I cannot figure out how to also to get it in a subfolder called "Proformas". Also If possible I would like the saved file to have the macro deleted w/o having to save the file on close. the saved version still has the macro in the files unless i hit save or choose to keep changes on close. These two little things are the only hurdles for this lil project (so Far), any help will be appreciated. Current Macro Below Code: -------------------- Sub GenerateProforma() ' ' GenerateProforma Macro ' Macro recorded 05/31/2006 by Curtis W Bennett Jr ' ' Cells.Select Selection.Copy Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _ False, Transpose:=False Application.DisplayAlerts = False Sheets("Tool Data").Select Application.CutCopyMode = False ActiveWindow.SelectedSheets.Delete Sheets("Tables and DBs").Select ActiveWindow.SelectedSheets.Delete Sheets("Information").Select ActiveWindow.SelectedSheets.Delete Range("A10").Select ActiveSheet.Shapes("Button 83").Select Selection.Delete ThisFile = Range("J19").Value ActiveWorkbook.SaveAs Filename:=ThisFile Application.DisplayAlerts = True Dim vbCom As Object Set vbCom = Application.VBE.ActiveVBProject.VBComponents vbCom.Remove VBComponent:= _ vbCom.Item("GenerateProforma") End Sub -------------------- -- Curben ------------------------------------------------------------------------ Curben's Profile: http://www.excelforum.com/member.php...o&userid=35874 View this thread: http://www.excelforum.com/showthread...hreadid=556646 |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Want to Set the File Save As path | Excel Programming | |||
file save as (path and custom name) | Excel Programming | |||
save as path | Excel Discussion (Misc queries) | |||
Save to Path & Variable file name | Excel Programming | |||
Save file path in cell | Excel Programming |