Public Sub Ordner_erstellen()
'Diese Modul erstellt Ordner
Dim strNr As String
Dim strText As String
Dim strPfad As String
Dim strOrdner As String
Dim oFSO As Object
strNr = thisProject.Variables.Item("RV_OrdnerName").Value
strText = Format(CStr(strNr), "000000000000")
'Exportpfad
strPfad = "D:\S7_Export\AppData" ' Pfad einstellen
strOrdner = strText
Set oFSO = CreateObject("Scripting.FileSystemObject")
If oFSO.FolderExists(strPfad) Then
If Not oFSO.FolderExists(strPfad & "\" & strOrdner) Then
oFSO.CreateFolder (strPfad & "\" & strOrdner)
End If
Else
'Code
thisProject.Variables.Item("RV_NoFolder").Value = 1
End If
Set oFSO = Nothing
End Sub
Ich möchte den folgen Codesschnipsel so mit einbringen das er dafür sorgen soll das wenn die "Variable leer" ist, die Sub beendet wird.
If thisProject.Variables.Item("RV_OrdnerName").Value > 0 Then
Exit Sub
End If
Wenn die Variable leer ist steht in HEX B#16#20 drin. Als Zeichen steht folgendes drin ( ' ' )
Mit Value > 0 funktioniert es nicht. Hat einer von Euch eine Idee wie es richtig ist.
Wie stellt man diesen HEX Wert oder das Zeichen in VBA dar??
Vielen Dank im voraus.
Mit freundlichen Grüßen
TommylikThis document governs the use of our Community Forum. By registering and using the platform, you accept these conditions.
The COPA-DATA Community Forum serves to encourage the exchange of information and experience about the zenon software between forum users respectively zenon users.
Please mind that any published information on the Community Forum is the subjective opinion and view based on the experience and the level of knowledge of the author. COPA-DATA does not overtake any responsibility for the content and the accuracy of the shared information.
Users of the Community Forum are encouraged to share only well-founded experiences and to point out any risks associated with the implementation of proposed solutions to problems. COPA-DATA at its absolute discretion, reserves the right to moderate the forum. In this connection COPA-DATA may remove any information containing false facts, potentially dangerous solutions, bad language or content that may insult, degrade or discriminate others. COPA-DATA may block a non-complying user from forum access if the user violated this provision.
COPA-DATA reserves the right to change this document from time to time at own discretion.
Ing. Punzenberger COPA-DATA GmbH
Karolingerstraße 7b · 5020 Salzburg · Austria
www.copadata.com