A
Ashish Kanoongo
I am genrating various Excel worksheet in workbook using MS-Access. I am able to generate worksheet and with the different name. My problem is that when ever I create workbook, 1/3 worksheet automatically appears. I dont want this (sheet1, sheet2, sheet3). I want only my generated worksheet. FOllowing is my coding for adding
*-----------------------------------------------
Dim ExcelApp As New Excel.Application
Dim ExcelSht As New Excel.Worksheet
Dim ExcelWkb As New Excel.Workbook
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
Set ExcelWkb = ExcelApp.Workbooks.Add
----------Loop Start
Set ExcelSht = ExcelWkb.Worksheets.Add
ExcelSht.Visible = xlSheetVisible
ExcelSht.Move after:=Worksheets(Worksheets.Count)
ExcelSht.name = arrCount(name)
ExcelSht.PageSetup.PrintGridlines = True
ExcelSht.PageSetup.Orientation = xlPortrait
..
..
..
..
--- Loop End
*--------------------------
*-----------------------------------------------
Dim ExcelApp As New Excel.Application
Dim ExcelSht As New Excel.Worksheet
Dim ExcelWkb As New Excel.Workbook
Set ExcelApp = CreateObject("Excel.Application")
ExcelApp.Visible = True
Set ExcelWkb = ExcelApp.Workbooks.Add
----------Loop Start
Set ExcelSht = ExcelWkb.Worksheets.Add
ExcelSht.Visible = xlSheetVisible
ExcelSht.Move after:=Worksheets(Worksheets.Count)
ExcelSht.name = arrCount(name)
ExcelSht.PageSetup.PrintGridlines = True
ExcelSht.PageSetup.Orientation = xlPortrait
..
..
..
..
--- Loop End
*--------------------------