Using this code from a vb 6 form (with selected workbook already open):
Set xlApp = GetObject(,"Excel.Application") '<-- locates excel application
Set xlWkBk = xlApp.Workbooks(strFile) '<-- locates workbook strFile in the excel application
Set xlWs = xlWkBk.WorkSheets(StrWs) '<-- locates worksheet StrWs in the workbook strFile
xlWkBk.Activate '<-- activate the workbook (I am not sure if this is necessary)
xlWs.Select '<-- select the worksheet (I am not sure if this is necessary)
xlApp.WindowsState = xlMinimized '<-- this minimizes the application, not to block the previewed worksheet
' I have tried with and without this line of code.
xlws.PrintPreview '<-- the worksheet in preview stays minimized in task bar but blinking
I need above code to be revised such that the previewed worksheet would popup and the user dosn't have to click on it to bring it up.