![]() |
Can't see my worksheet in excel
Here's my code. When I run it, it doesn't show the worksheet opening and
viewing it. My code is in VB6 don't worry about the other stuff listed. Thanks Pat Private Sub cmdprocess_Click() Dim remove_selected As Integer Dim SSQL As String Dim mdlopt2 As New ADODB.Recordset Dim stuff As String 'Dim col As Integer 'Dim row As Long Dim Excel As Excel.Application Dim ExcelWbk As Excel.Workbook Dim NFRCWS As Excel.Worksheet Set Excel = GetObject(, "Excel.application") 'Create excel object Set ExcelWbk = Excel.Workbooks.Open("j:\nfrc.xls") 'open this workbook to excel Dim MyRange As Range 'Set MyRange = NFRCWS.Range("a65536").End(xlUp).Offset(1, 0) Dim LASTROW As Integer 'Dim intloopindex As Integer Dim ItemIndexes() As Long, x As Integer, iNumItems As Integer Set NFRCWS = ExcelWbk.Worksheets(1) 'add this sheet to this workbook ExcelWbk.Application.DisplayAlerts = True 'NFRCWS.Visible = xlSheetVisible ExcelWbk.Application.Visible = True NFRCWS.Visible = xlSheetVisible mdlopt2.CursorType = adOpenKeyset mdlopt2.LockType = adLockBatchOptimistic |
All times are GMT +1. The time now is 04:04 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com