Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Mismatch
I'm writing a small test macro to create folders for Excel files to be
placed in. I've put the folder names in cells a2:a4. I put the path to the new folders in C1. here is the code: Sub MkDirTest() Dim CtyRange As Range Dim myCell As Range Set CtyRange = Range("a2:a4") For Each myCell In CtyRange.Cells MkDir Range("c1").Value & Range("A2:a4").Value Next End Sub I'm getting a "Type Mismatch" error when I run the macro on the "MkDir Range...." line. Can't figure out why? any ideas? Thanks for the help. |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Mismatch
Change to ....
MkDir Range("c1").Value & myCell.Value HTH "davegb" wrote: I'm writing a small test macro to create folders for Excel files to be placed in. I've put the folder names in cells a2:a4. I put the path to the new folders in C1. here is the code: Sub MkDirTest() Dim CtyRange As Range Dim myCell As Range Set CtyRange = Range("a2:a4") For Each myCell In CtyRange.Cells MkDir Range("c1").Value & Range("A2:a4").Value Next End Sub I'm getting a "Type Mismatch" error when I run the macro on the "MkDir Range...." line. Can't figure out why? any ideas? Thanks for the help. |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
Range Mismatch
Bingo! Thanks, Toppers!
|
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Type Mismatch on some PCs | Excel Programming | |||
Type mismatch in VBA LinEst function if range too large | Excel Programming | |||
Type Mismatch | Excel Programming | |||
Type Mismatch | Excel Programming | |||
Mismatch!? | Excel Programming |