View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Orne Orne is offline
external usenet poster
 
Posts: 2
Default Save as cell with path

Curben wrote:
- Save as a filename in a particular cell in a particular subfolder - Partial


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".


Why not just append "Proformas\" to the beginning of your Save path?

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.


You could always have the Module in a different workbook A, and all of
your functions operate on the file you opened (workbook B).

Current Macro Below


Code:
--------------------

Sub GenerateProforma()
Cells.Copy
Cells.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
Application.DisplayAlerts = False
Sheets("Tool Data").Delete
Sheets("Tables and DBs").Delete
Sheets("Information").Delete
Application.DisplayAlerts = True

Range("A10").Select
ActiveSheet.Shapes("Button 83").Delete
ThisFile = Range("J19").Value
ActiveWorkbook.SaveAs Filename:= "Proformas\" & ThisFile

Dim vbCom As Object
Set vbCom = Application.VBE.ActiveVBProject.VBComponents
vbCom.Remove VBComponent:=vbCom.Item("GenerateProforma")
End Sub