mkdir

  1. TheWaterDog

    MkDir Question - saving workbook within newly created directory?

    This is so painfully close to working - it needs a tiny tweek and I'm hoping a genius can help with the last little bit? I've got an index [named A3 Materials Requisition] that uses a Command Button to add the next number to an existing sequence [named IE79MR001, IE79MR002, etc]. It logs the...
  2. A

    Looping a MkDir function

    Hello all, I am trying to create a batch of folders where the code is normally quite simple: MkDir[D3&E3] I have several hundred that I regularly make. So far, I just have the same line repeated, but I'm trying to do some sort of loop or check to look for values in a column, and if present...
  3. G

    SaveAs save in right folder

    Hi I got this code: Private Sub GemSom_Click() If Dir(ThisWorkbook.Path & "" & Range("b6").Value & " " & Date, vbDirectory) = "" Then MkDir ThisWorkbook.Path & "" & Range("b6").Value & " " & Date End If 'Dim Path As String 'Dim FileName As String 'FileName = Range("b6").Value & " " & Date...
  4. Pinaceous

    VBA MkDir Folder

    Hi All, I'm working with this code in producing a common file folder in the current directory. Sub MakeMyFolders() MkDir ThisWorkbook.path & "\mmyy" End Sub I'd like to use the Format(Now(), "mm-yy") to produce the current month and year for the file folder. Can someone please help...
  5. S

    Mkdir on network location causes a debug error

    I have two snippets of code that work just fine locally but seem to have issues when run over the network. When I run the code from within my LAN, it captures a directory location (Path), checks to see if that location exists, and if it doesn't, then make the correct directory tree. The...
  6. S

    Error Handling for the mkdir command

    Hi, I have written some code which saves down a particular sheet of my excel workbook in excel and PDF form. I use the mkdir to create a new directory for the files to be saved in - however I need to insert some error handling into my code so that if I have already run the code and created the...
  7. MPW

    Excel VBA writing a VB script file (Problem with MkDir Command

    Hello. I am using using VBA to create a VB script file that will create folders and copy files. Everything was running great until I tried to use the MkDir command. Here is the VBA Command followed by how it appears in the VB script. macfile.Write (" MkDir(""" & dest & "\" & stk & "_" &...
  8. Tim_Excel_

    Creating a new folder in Sharepoint using VBA

    Hi forum, I'm trying to automatically save workbooks using VBA to a Sharepoint folder- which needs to be created first. Code I have below works ONLY for saving the file. The MkDir function returns a Run-time error 76: Path not found. I'm at a loss what causes this error, because the path...
  9. G

    Using MkDir and then populating Hyperlink using Add Method

    Hi All, I have been searching for the past few hours and trying a multitude of different items for such a simple task and its just not playing ball. What i want to do is the following I have a cell named ListingFolder - the contents of cell is a formula which displays the directory name i...
  10. A

    VBA Function to Create One, Two, or More, Paths

    Hi all, I have several databases that make use of the mkdir function to verify that year and month folders are always created before storing reports. To save room and make my code more efficient, I wrote a function, CheckForPaths, that accepts two string arguments, and uses if functions to...
  11. M

    VBA to create new workbook + save ... then resume loop

    Hi Everyone - I am trying have a loop in which after each 'loop' copy a particular tab ("Summary") and create its own workbook + save it + then resume the loop in the original file. Is this then possible? This part of the code below I think I need something different because this will just...
  12. D

    Create New Word document XML format

    Good Day All how to create new Word 2010 XML Format and later by create folders are need and fill with required XML thanks Sub creatWordXml() Dim FilePath As String, docPropsFolder As String, relsFolder As String, wordFolder As String, relsFolder1 As String, themeFolder As String...
  13. C

    Need Help! Create New folder and save file in the new folder

    Hi All! New to VBA. Struggling with this. Would appreciate any help I want to, open a workbook save it in a new directory from created from cell h5 value F:\Job Packets"H5"\my new file name (which will be value from h5 as well followed by the word "lot" I have macro to save work book as the...
  14. L

    Nesting Multiple Tests Of MkDir's?

    Hi, If I wanted to test if any of these filepaths exist and if not to create, what would be the simplest way to nest create? e.g. S:\Folder1\Folder2\Folder3\Folder4 What I've been using is.. but can it be shortened? If Len(Dir("S:\Folder1\", vbDirectory)) = 0 Then MkDir ("S:\Folder1\"...
  15. H

    create folder in sequence by vba

    <!--[if gte mso 9]><xml> <w:WordDocument> <w:View>Normal</w:View> <w:Zoom>0</w:Zoom> <w:TrackMoves/> <w:TrackFormatting/> <w:PunctuationKerning/> <w:ValidateAgainstSchemas/> <w:SaveIfXMLInvalid>false</w:SaveIfXMLInvalid> <w:IgnoreMixedContent>false</w:IgnoreMixedContent>...
  16. G

    Trying to MkDir, ActiveWorkbook.SaveAs using cell variables -and failing. What is IfNewFolder?

    I really could use some advice. I am new to this forum, so please forgive my mistakes. Thanks, in advance. I wish to have a button launched macro that saves my workbook to a new folder -both of which are named after cells on the active worksheet. So far, I can get the folder created (from...
  17. E

    Create New Folder if Folder Doesn't Exist

    Hello! So I've created the following formula that should create a new folder based on the year, but if it already exists, I don't want to create the new folder. This formula seemed to work well, until I did a troubleshoot of "2018" by replacing TodayYear with "2018"... it did not work then. Can...
  18. D

    [VBA Related] issue when Create a sub path & export a cell data to the sub path based on the folder name

    Hello everyone, I am trying to use VBA to create & export some data of the Excel file to some shared profiles. Below is what I have done so far: Sub ExportAllSQL() Dim wsData As Variant Dim myFileName As String Dim FN As Integer Dim p As Integer, q As Integer Dim path_parent As String...
  19. M

    MkDir - "Path Not Found"

    Hi, I am trying to create folders and sub folders if they don't already exist. Everything I try comes up with the runtime error 76 - Path Not Found", Any ideas? Thanks SharePointPath = "C:\Temp\RBB Test\" 'Calculate how many reports to generate CRows = ActiveSheet.Cells(Rows.Count...
  20. M

    MACRO - Check/Create Folder Structure And Save

    Hi I had previously posted something about this but I am still having problems, I am a novice with Macros. I have an Excel spreadsheet that I need to save via a Macro, however, I need it to be saved in a specific location, which is compiled in a Cell in Excel I.e. D5 - returning the following...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top