Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to insert Excel Worksheet Name using Automation in VB Dot Net??


"Herfried K. Wagner [MVP]" wrote in message
...
Hello,

"Vanessa" schrieb:
In my VB Dot Net program, I'm using Automation to call
Excel worksheet to do some insert some data.

I have rename my worksheet to a name. eg. "ABC".

How do I insert the worksheet name & Page No to the
Footer so that when I print the worksheet, the name of
the worksheet and page number will be
printed out as well?


I think the Excel programmers can help you:

news://news.microsoft.com/microsoft....el.programming

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet





  #2   Report Post  
Posted to microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default How to insert Excel Worksheet Name using Automation in VB Dot Net??

Hello,

"Vanessa" wrote:
[Nothing new]

???

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet


  #3   Report Post  
Posted to microsoft.public.dotnet.general,microsoft.public.dotnet.languages.vb,microsoft.public.excel.programming
external usenet poster
 
Posts: 576
Default How to insert Excel Worksheet Name using Automation in VB Dot Net??

Vanessa,

This code will put "Page #" in the right footer and the sheet tab name in
the center footer

With ActiveSheet.PageSetup
.LeftFooter = "Page & &P"
.CenterFooter = "&A"
End With

You can use the macro Recorder to get other code. But beware that the code
I got for PageSetup was 32 lines and I had to edit it down to 4 lines. This
edit is especially important in this case since PageSetup is a very slow
procedure and bogs down your code.

The other way is to just manually go into PageSetup and set it up.
--
sb
"Vanessa" wrote in message
...

"Herfried K. Wagner [MVP]" wrote in message
...
Hello,

"Vanessa" schrieb:
In my VB Dot Net program, I'm using Automation to call
Excel worksheet to do some insert some data.

I have rename my worksheet to a name. eg. "ABC".

How do I insert the worksheet name & Page No to the
Footer so that when I print the worksheet, the name of
the worksheet and page number will be
printed out as well?


I think the Excel programmers can help you:

news://news.microsoft.com/microsoft....el.programming

Regards,
Herfried K. Wagner
--
MVP · VB Classic, VB .NET
http://www.mvps.org/dotnet







Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
EXCEL 2007 - INSERT NEW WORKSHEET robzrob Excel Worksheet Functions 4 April 19th 09 07:44 PM
Worksheet Automation and Size Limiting AUCP03 Excel Worksheet Functions 0 April 9th 09 10:25 PM
Worksheet Design for Automation markmcd Excel Discussion (Misc queries) 3 February 11th 08 01:04 PM
Unable to Insert Worksheet/Move and copy worksheet Excel 2003 lukerush Excel Worksheet Functions 2 September 7th 06 05:05 PM
How do I insert a clock in excel worksheet? Vishal Excel Worksheet Functions 1 May 9th 05 03:03 PM


All times are GMT +1. The time now is 10:52 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"