It will only be the default while your program is running. Then it will revert.
You could save the value, and set it every time your program runs, though.
' Add a reference to the Windows Script Host Object Model
Private Sub Command1_Click()
Dim wshobj As WshNetwork
' Create a new reference to the above-mentioned object library.
' Call on the "SetDefaultPrinter" method to do exactly that.
Set wshobj = New WshNetwork
wshobj.SetDefaultPrinter ("PrinterNameHere")
' Unload the no-longer required object from the computer's memory.
Set wshobj = Nothing
End Sub
Please rate this post if it was useful for you!
Please try to search before creating a new post,
Please format code using [ code ][ /code ], and
Post sample code, error details & problem details