P
Patrice
The following code :
Public Class c
Shared Sub main()
Dim obj As Object
Dim wbk As Object
Dim wks As Object
obj = CreateObject("Excel.Application")
'bj.Visible = True
wbk = obj.WorkBooks.Add
wks = wbk.WorkSheets("Feuil1")
obj.visible = True
wks.Cells(1, 1).Value = "A"
wks.PageSetup.CenterFooter = "Page &N"
MsgBox(wks.PageSetup.CenterFooter)
obj = Nothing
End Sub
End Class
The &N code should display the page number. Instead it shows the workbook
file name ? The same code works in Excel VBA. Looks like some kind of
interaction with Excel/.NET.
Is this a known problem ? I'm using a French version of Excel in case it
matters...
TIA for any advice...
Public Class c
Shared Sub main()
Dim obj As Object
Dim wbk As Object
Dim wks As Object
obj = CreateObject("Excel.Application")
'bj.Visible = True
wbk = obj.WorkBooks.Add
wks = wbk.WorkSheets("Feuil1")
obj.visible = True
wks.Cells(1, 1).Value = "A"
wks.PageSetup.CenterFooter = "Page &N"
MsgBox(wks.PageSetup.CenterFooter)
obj = Nothing
End Sub
End Class
The &N code should display the page number. Instead it shows the workbook
file name ? The same code works in Excel VBA. Looks like some kind of
interaction with Excel/.NET.
Is this a known problem ? I'm using a French version of Excel in case it
matters...
TIA for any advice...