While you can Dim more than one variable on a line of code, you
need to use only a single Dim keyword.
Change
dim cou as integer,Dim FolderStr as string, FileSys
to
dim cou as integer, FolderStr as string, FileSys
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com
"Jim15" <Jim15.256urc_1143228002.2749@excelforum-nospam.com>
wrote in message
news:Jim15.256urc_1143228002.2749@excelforum-nospam.com...
>
> I am getting a syntax and compile error on the dim cou ....
> line. Any
> suggestions?
>
> Thanks,
>
> Jim
>
> Sub createfolders()
> '
> '
> dim cou as integer,Dim FolderStr as string, FileSys
> For cou = 1 To ActiveSheet.UsedRange.Rows.Count
> FolderStr = Format(Trim(Str(cou)), "00#") + "_" +
> ActiveSheet.Cells(cou, 1)
> Set FileSys = CreateObject("Scripting.FileSystemObject")
> FileSys.createfolder C:\ + RESERVES
> Next
> End Sub
>
>
> --
> Jim15
> ------------------------------------------------------------------------
> Jim15's Profile:
> http://www.excelforum.com/member.php...o&userid=26300
> View this thread:
> http://www.excelforum.com/showthread...hreadid=526198
>
Bookmarks