chichaspowa
New Member
- Joined
- Sep 6, 2010
- Messages
- 46
hi everyone, i have a button on a userform that enables the user to scan a document, what it does is open the scanners executable file, creates a default image file name and tells the user to wait until the pdf is open, only after its open the user presses ok to change the files name to the textbox.value
What i would like to do is make a progress bar and not have the need to prompt the user to change the file name after the pdf file opens. so in other words the code would automatically change the name of the file after hpPdf.pfd is completely open. Is this possible? this is my code
thanks guys
What i would like to do is make a progress bar and not have the need to prompt the user to change the file name after the pdf file opens. so in other words the code would automatically change the name of the file after hpPdf.pfd is completely open. Is this possible? this is my code
Code:
Private Sub CommandButton9_Click()
answer = MsgBox("insert document in scanner and push yes - no to cancel", vbYesNo)
If answer = vbYes Then
Shell ("C:\Programas\Ficheiros comuns\Hewlett-Packard\Scanjet\Corp20\DocProc\hpScanPDf.exe")
Else
Exit Sub
End If
adr = "C:\Documents and Settings\Utilizador\Os meus documentos\hpPDF.pdf"
MsgBox "wait for scan to finish, push ok when pdf is open "
If FileFolderExists("C:\Documents and Settings\Utilizador\Os meus documentos\" & ChequeBox.Value & ".pdf") Then
MsgBox "the file already exists"
Else
Name "C:\Documents and Settings\Utilizador\Os meus documentos\hpPDF.pdf" As "C:\Documents and Settings\Utilizador\Os meus documentos\" & ChequeBox.Value & ".pdf"
End If
End Sub
thanks guys