Okay, let first start by reminding you of code tags...
Then let me say where are you getting this error? What line and what are the state of your variables?
Next up is how do you add, i.e. the use of addition, two string together? (Sarcastic, yes, I know). But in reality you concatinate two string together by the use of the ampersand character (&)...
String1 = String1
& String2
Another thing I noticed is in the first case you have "\path" but in the second and thereafter cases you have "\path
\"
Public Sub CreateDir()
Drv = App.Path
If Right(Drv, 1) = "\" Then Drv = Left(Drv, Len(Drv) - 1) 'chop off any trailing back slash as you have seemed to include it below in your code so as to avoid a double backslash in the path "\\"
ChDir Drv
Select Case intRegg
Case 1
Flow = Drv & "\CHXPLUS1"
Case 2
Flow = Drv & "\CHXPLUS2"
Case 3
Flow = Drv & "\CHXPLUS3"
Case 4
Flow = Drv & "\CHXPLUS4"
Case 5
Flow = Drv & "\CHXPLUS5"
Case 6
Flow = Drv & "\CHXPLUS6"
End Select
MkDir Flow
WriteFiles 1, 1, 0
Back2_3 4
End Sub
Also, I removed all of your mkdir statements since the select case is only used to build the path and put the mkdir statement after the select case to shorten your code.
Then I removed your case else as you had no code there so no need for the case else.
Now, finally, if you are using this code on vista then that is your problem as the C:\Program Files\AppName folder is protected. Please see this thread...
http://www.vbforums.com/showthread.p...02#post2807202
for changes you need to make to your program.
Good Luck