Results 1 to 6 of 6

Saving Workbook in newly created directory

Threaded View

  1. #1
    Registered User
    Join Date
    06-03-2009
    Location
    California
    MS-Off Ver
    Excel 2000
    Posts
    20

    Saving Workbook in newly created directory


    I am trying to have the user hit a button and save the workbook in a newly created directory. Currently it creates the new workbook and the new directory with the correct names, however the workbook is not in the newly created directory.

    Below is the code. Any suggestions?




    
    Sub RFIFORMSave()
    
    Global rfinum As Integer    'RFI number counter or variable
    
        
        MkDir ("c:\sgreni\AnyJob\" & "some_RFI_" & rfinum)
        ChDir ("c:\sgreni\AnyJob\" & "some_RFI_" & rfinum)
        ActiveWorkbook.SaveAs Filename:="c:\sgreni\AnyJob\" & "some_RFI_" & rfinum
    
        
        this code should include after MkDir and before ChDir:
    
    
        chDirive file path! :)
    
            
    End Sub
    
    Last edited by sgreni; 06-24-2009 at 03:51 PM. Reason: solved

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