Visualizzazione dei risultati da 1 a 6 su 6
  1. #1

    errore anche se non c'e'

    VVoVe: io non vedo nessuno eerrore, e infatti funziona, anzi, funziona anche troppo...
    pero', dopo che ha eseguitp il suo compito cioe' questo:
    Dim Pt As String
    Pt = App.Path & "\" & "Source" & "\" & "Machine" & "\" & TxtName.Text & "\"

    Dim g1 As String
    g1 = txtGruppo1.Text

    Dim g2 As String
    g2 = txtGruppo2.Text

    Dim g3 As String
    g3 = txtGruppo3.Text

    Dim g4 As String
    g4 = txtGruppo4.Text

    Dim g5 As String
    'g5 = txtGruppo5.Text

    Dim g6 As String
    g6 = txtGruppo6.Text

    Dim g7 As String
    g7 = txtGruppo7.Text

    Dim g8 As String
    g8 = txtGruppo8.Text

    Dim g9 As String
    g9 = txtGruppo9.Text

    Dim g10 As String
    g10 = txtGruppo10.Text


    Dim fso As FileSystemObject
    Dim fld As Folder
    Dim sflds As Folders
    Dim sfld As Folder

    Set fso = New FileSystemObject
    Set fld = fso.GetFolder(Pt)
    Set sflds = fld.SubFolders

    For Each sfld In sflds

    If g1 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g1
    End If


    If g2 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g2
    End If


    If g3 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g3
    End If


    If g5 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g5
    End If


    If g6 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g6
    End If


    If g7 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g7
    End If


    If g8 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g8
    End If


    If g9 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g9
    End If


    If g10 = "" Then
    Label22.Caption = "..."
    Else
    fso.CreateFolder sfld & "\" & g10
    End If

    Next

    Set sflds = Nothing
    Set fld = Nothing
    Set fso = Nothing
    mi viene fuori questa simpaticissima finestrella:
    qualcuno sa il perche'? ci sto impazzendo io

  2. #2
    ah mi sono dimenticato di dire che quando faccio il debug mi da la stringa:
    fso.CreateFolder sfld & "\" & g1

  3. #3
    Moderatore di Programmazione L'avatar di alka
    Registrato dal
    Oct 2001
    residenza
    Reggio Emilia
    Messaggi
    24,472
    Originariamente inviato da andrea toniolo
    io non vedo nessuno eerrore, e infatti funziona, anzi, funziona anche troppo...
    Se ti viene segnalato l'errore, evidentemente l'errore c'è, a differenza di quanto hai scritto nel titolo (che poteva essere più significativo).
    MARCO BREVEGLIERI
    Software and Web Developer, Teacher and Consultant

    Home | Blog | Delphi Podcast | Twitch | Altro...

  4. #4

  5. #5

  6. #6

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.