I am having and using this code for (part of it) for some transformations/filtering from certain files to certain files, plus some filtering on sheets and so on... Everything works good for me, but the colleagues from the work wanna also use this code on their PC*s, and there is a problem at start, it has to be edited in the code (path, location) so that someone else can use it - and I dont wanna that anyone from outside have an access to the code easily (ok theyre not skilled but still), so that can mess it up and make it crap what is possible.
Question, is there any line of code that gives like popup message simply asking to define from where you wanna take certain files to where? to avoid going into code and change from there? I hope I was clear enough...
Dim FileSystem As Object
Dim HostFolder As String
' *** Folder with systems to define (path) ***
HostFolder = "Q:\Objekt\Kundenerklärung\OSRAM\Converter"
' *** If folder is empty/full message ***``
Dim fs, strFolderPath, oFolder
Set fs = CreateObject("Scripting.FileSystemObject")
Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual
strFolderPath = "Q:\Objekt\Kundenerklärung\OSRAM\Converter\" ' *** This is
your folder to define ***
Set oFolder = fs.GetFolder(strFolderPath)
If (oFolder.SubFolders.Count = 0) Then
' * Folder is Empty *
MsgBox "Folder is empty!"
Else
' * Folder isn't empty *
MsgBox "Folder not empty. Subfolders count: " & oFolder.SubFolders.Count
End If
Set fs = Nothing
Set FileSystem = CreateObject("Scripting.FileSystemObject")
DoFolder FileSystem.GetFolder(HostFolder)
Application.ScreenUpdating = True
Application.Calculation = xlCalculationAutomatic