View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
Vj Vj is offline
external usenet poster
 
Posts: 54
Default Cant view excel worksheet in web browser

Can anyone tell me why I cant see the excel worksheet in a new workbook
created by this code if runs through another .xlt workbook open through web
browser.

Sub CreateNewWB()
Dim ThisSheet As String
Dim sheet As Object
Dim currentBook As Workbook
Dim TempBook As Workbook
Set currentBook = ActiveWorkbook

Set TempBook = Workbooks.Add

'If (TypeName(ActiveSheet) = "Worksheet") Then
'currentBook.Worksheets("Sheet1").Copy befo=TempBook.Sheets(1)
'Sheets(ThisSheet).Move befo=Workbooks(TempBook).Sheets(1)
'End If

TempBook.Worksheets(1).Name = "ABC"
TempBook.Worksheets(1).Activate
With Application
'currentBook.Close SaveChanges:=False
'Set currentBook = Nothing
End With
End Sub