Results 1 to 7 of 7

Creating folderpaths based on variables

Threaded View

  1. #1
    Forum Contributor
    Join Date
    02-24-2010
    Location
    Dublin, Ireland
    MS-Off Ver
    Excel 2003
    Posts
    195

    Talking Creating folderpaths based on variables

    I'm looking to create folders on the fly with the folderpaths being based on defined variables.

    Could someone please have a look at my code below and tell me where Im going wrong?

    MainPath = "Z:\Mike\Retail Sept 2011\Macro\Tony Work\"
    
    '***Copy Data From DumpFile***
        Windows("Sample Data Dump.xls").Activate
            Selection.AutoFilter Field:=1, Criteria1:=ParentNSC
            Range("A2").Select
            Range(Selection, Selection.End(xlDown)).Select
            Range(Selection, Selection.End(xlToRight)).Select
            Selection.Copy
            
    '***Paste Date Into Template***
        Workbooks.Open Filename:=MainPath & "COINS Template.xls"
            Range("A2").Select
            Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
                :=False, Transpose:=False
                
    '***Define Region & Branch***
        Region = Range("B2")
        Branch = Range("C2")
                
        MkDir MainPath & "Outputs\" & "Region" & "\" & "Banch"
    Last edited by TonyforVBA; 10-24-2011 at 06:19 AM.

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