Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Running executable from form command button

Status
Not open for further replies.

TrekBiker

Technical User
Nov 26, 2010
330
GB
I'm copying a known working print system from a client's computer to mine for further development.

The setup is

Database location : C:\Users\David\Order Tracker
or \\Acer\David\ Order Tracker

Print Executable : C:\Users\David\printGyleLabels.exe

Printer share name : hp1005 on Acer

Command button : cmdTest

Code:
Private Sub cmdTest_Click()

On Error GoTo Err_cmdPrintGyleLabel_Click
    Dim stAppName As String
    Dim intGyleID As Integer
    intGyleID = Me!GyleID

    stAppName = "C:\Users\David\printGyleLabels.exe " & """\\Acer\David\Order Tracker.mdb""" & " " & """\\acer\hp1005""" & " " & intGyleID
    Call Shell(stAppName, 1)

Exit_cmdPrintGyleLabel_Click:
    Exit Sub
Err_cmdPrintGyleLabel_Click:
    MsgBox Err.Description
    Resume Exit_cmdPrintGyleLabel_Click
End Sub

The cursor wheel goes round for a few seconds then nothing else happens.
 
I was told that this might be a security issue, or a Windows version issue. I'm using Norton 365 and Windows 10 Home Edition.
The working version is on Windows 10 Professional with a more configurable antivirus program.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top