Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.
Private Sub PrintExcel() Dim PrintDialog1 As New PrintDialog() Dim clsFrmain As New ClsFrmMainLoad Dim result As DialogResult = PrintDialog1.ShowDialog() If (result = DialogResult.OK) Then Dim strFile As String = StrExcelLocation Dim objProcess As New System.Diagnostics.ProcessStartInfo Dim strPrnterName As String = StrPrinterName With objProcess strFile = clsFrmain.ReturnPrintFilePath() .FileName = strFile .WindowStyle = ProcessWindowStyle.Hidden .Verb = "printTo" .Arguments = PrintDialog1.PrinterSettings.PrinterName .CreateNoWindow = True .UseShellExecute = True End With Try System.Diagnostics.Process.Start(objProcess) Catch ex As Exception MessageBox.Show(ex.Message) End Try End If End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.