ragazzi quel problema di prima di copia delle cartelle e checkbox l'ho risolto.però mi manca l'ultima cosa.
questo è il codice:


Private Const FO_COPY = &H2&
Private Const FOF_ALLOWUNDO = &H40&
Private Const FOF_CONFIRMMOUSE = &H2&
Private Const FOF_CREATEPROGRESSDLG = &H0&
Private Const FOF_FILESONLY = &H80&
Private Const FOF_MULTIDESTFILES = &H1&
Private Const FOF_NOCONFIRMATION = &H10&
Private Const FOF_NOCONFIRMMKDIR = &H200&
Private Const FOF_RENAMEONCOLLISION = &H8&
Private Const FOF_SILENT = &H4& 'Progress non visibile
Private Const FOF_SIMPLEPROGRESS = &H100& 'non visualizzare il nome del file
Private Const FOF_WANTMAPPINGHANDLE = &H20&

Private Type SHFILEOPSTRUCT
hwnd As Long
wFunc As Long
pFrom As String
pTo As String
fFlags As Integer
fAnyOperationsAborted As Long
hNameMappings As Long
lpszProgressTitle As String
End Type

Private Declare Sub CopyMemory Lib "Kernel32" Alias "RtlMoveMemory" (hpvDest As Any, hpvSource As Any, ByVal cbCopy As Long)
Private Declare Function SHFileOperation Lib "Shell32.dll" Alias "SHFileOperationA" (lpFileOp As Any) As Long

Public Function CopyFile(Source As String, Dest As String, AskOverwrite, Visib) As Boolean
Dim lenFileop As Long
Dim foBuf() As Byte
Dim fileop As SHFILEOPSTRUCT
lenFileop = LenB(fileop)
ReDim foBuf(1 To lenFileop)
With fileop
.hwnd = Form1.hwnd
.wFunc = FO_COPY
.pFrom = Source & vbNullChar & vbNullChar & vbNullChar
.pTo = Dest & vbNullChar & vbNullChar

If AskOverwrite = False Then .fFlags = FOF_NOCONFIRMATION 'nn chiede la sovrascrittura
If Visib = False Then .fFlags = .fFlags Or FOF_SILENT 'invisibile

.lpszProgressTitle = "Copia " & Dest & vbNullChar & vbNullChar
End With

Call CopyMemory(foBuf(1), fileop, lenFileop)
Call CopyMemory(foBuf(19), foBuf(21), 12)

CopyFile = SHFileOperation(foBuf(1)) = 0

End Function

Private Sub Command1_Click()
If ceckboxdocumenti Then x = CopyFile("C:\Documents and Settings\" & txt & "\documenti", "H:\", True, True)
If ceckboxdesktop Then x = CopyFile("C:\Documents and Settings\" & txt & "\desktop", "H:\", True, True)
If Not x Then MsgBox "Errore la cartella specificata non esiste!", vbCritical, "Errore di copia"
End Sub


questo è il codice e fin quà ci siamo funziona tutto, però io invece di salvarlo sempre nell'unità "H" lo vorrei salvare in altre parti, selezionando la directory per copiare le cartelle utilizzando lo "Sfoglia per cartelle".
come fare???