Create a folder and sub folder in Excel VBA

后端 未结 13 1610
梦谈多话
梦谈多话 2020-11-28 05:43

I have a pull down menu of companies that is populated by a list on another sheet. Three columns, Company, Job #, and Part Number.

When a job is created I need a fo

13条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-28 06:02

    This works like a charm in AutoCad VBA and I grabbed it from an excel forum. I don't know why you all make it so complicated?

    FREQUENTLY ASKED QUESTIONS

    Question: I'm not sure if a particular directory exists already. If it doesn't exist, I'd like to create it using VBA code. How can I do this?

    Answer: You can test to see if a directory exists using the VBA code below:

    (Quotes below are omitted to avoid confusion of programming code)


    If Len(Dir("c:\TOTN\Excel\Examples", vbDirectory)) = 0 Then
    
       MkDir "c:\TOTN\Excel\Examples"
    
    End If
    

    http://www.techonthenet.com/excel/formulas/mkdir.php

提交回复
热议问题