progress bar until file is open

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

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
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,503
Messages
6,179,135
Members
452,890
Latest member
Nikhil Ramesh

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top