New
#1
Vbs Object required: '' (error on Line 5)(letter 1)
as it says in the title
Option Explicit
dim custFolder, folder
custFolder=InputBox("Type custom path")
Folder.CreateFolder "C:\" & custFolder & "folder1"
as it says in the title
Option Explicit
dim custFolder, folder
custFolder=InputBox("Type custom path")
Folder.CreateFolder "C:\" & custFolder & "folder1"
In line 5 it says
It uses a method on the Folder variable but problem is that it was declared (on line 2) but never initialized to anything, hence the error.Code:Folder.CreateFolder "C:\" & custFolder & "folder1"
What is lacking is creating the "file system object" before using it:
Code:Set folder=CreateObject("Scripting.FileSystemObject")