+ Reply to Thread
Results 1 to 3 of 3

Save as cell with path

  1. #1
    Registered User
    Join Date
    06-28-2006
    Posts
    2

    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

    Please Login or Register  to view this content.

  2. #2
    Orne
    Guest

    Re: 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


  3. #3
    Registered User
    Join Date
    06-28-2006
    Posts
    2
    Quote Originally Posted by Orne
    Why not just append "Proformas\" to the beginning of your Save path?
    I have tried a few methods of doing that, none have worked while using the range and I am not nearly proficient enough to figure out any other ways of combining.

    Quote Originally Posted by Orne
    You could always have the Module in a different workbook A, and all of
    your functions operate on the file you opened (workbook B).
    Will not work, this will be distributed to too many users at random and to utilize multiple workbooks would counteract the goal of simplifing it for the masses.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1