|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Urgent: VB.NET Code to Change Excel Worksheet Header/FooterASAP. I am doing it through a VB application. I can change the ranges/cell values using code, but I do not know how to change things outside of the cell ranges. I will try and post in an Excel group, but i do not need to change it in a worksheet, I need to change it through a VB application. For example, I am using this code to change values in certain cells: 'open excel document Dim ThisApplication As Excel.Application ThisApplication = New Excel.Application ' Start Excel and get Application object. ThisApplication = CreateObject("Excel.Application") ThisApplication.Visible = True 'connection for package Dim Wb As Excel.Workbook = ThisApplication.Workbooks.Open("C:\CDRLReview.xls") Dim CDRLWs As Excel.Worksheet = Wb.Worksheets(1) Dim DIDWs As Excel.Worksheet = Wb.Worksheets(2) DIDWs.Range("a2").Value = "There is no DID associated with this CDRL." DIDWs.Range("a2").Font.ColorIndex = 3 DIDWs.Range("a2").Font.Bold = True This code works! Yet, I need to change the Worksheet's header in the same fashion. I need to know if i can do something like: DIDWs.Header.Value = <~~ I don' t know what the correct code is, it's just an example. Thanks in Advance. ~Elena Elena,
I thought that Armin had already given you a good answer. It has no sense of spamming this newsgroup with consequent the same new messages. If somebody sees that he can help you better than Armin did, than he/she will do that. I assume that you did not know this, but please don't do it next time. Thanx in advance. Cor Cor,
Armin did not give me a good answer. A good answer would have been: ws.pagesetup.header = "your text" by the way, which works perfectly. I am not spaming the group. I reposted it because I trying to be clearer. From my discussion with Armin, it seemed to me that my first submission was unclear. Maybe next time you should ask why someone reposted something instead of assuming you were correct. Thanks. Show quoteHide quote "Cor Ligthert [MVP]" wrote: > Elena, > > I thought that Armin had already given you a good answer. It has no sense of > spamming this newsgroup with consequent the same new messages. If somebody > sees that he can help you better than Armin did, than he/she will do that. > > I assume that you did not know this, but please don't do it next time. > > Thanx in advance. > > Cor > > > "Elena" <El***@discussions.microsoft.com> schrieb Your code gave the impression that you know how to set a property.> Cor, > > Armin did not give me a good answer. A good answer would have been: > > ws.pagesetup.header = "your text" > > by the way, which works perfectly. Armin Elena,
If your repost had been in a day, than I could have understand it. Now you did reply within 3 hours, this newsgroup is done by a lot of persons from every where on the world and therefore almost 24 hours 7 days active. However they are not all up at the time you want to get a question. It is seen as polite if you will be so nice to accept that some persons need to sleep sometimes and therefore wait something longer for an answer in a newsgroup. Cor Cor,
I do not wish to argue with you, but you are obviousloy not reading my replies. My repost was not due to speed, it was to be more clear. I wasn't reposting to get an answer quickly, I reposted to get the answer I needed. Armin, I did not know the property I needed to set. That was my question. It has been answered and the code works properly. Thank you for your attempt to help. Have a good day, Elena. Show quoteHide quote "Cor Ligthert [MVP]" wrote: > Elena, > > If your repost had been in a day, than I could have understand it. > > Now you did reply within 3 hours, this newsgroup is done by a lot of persons > from every where on the world and therefore almost 24 hours 7 days active. > However they are not all up at the time you want to get a question. It is > seen as polite if you will be so nice to accept that some persons need to > sleep sometimes and therefore wait something longer for an answer in a > newsgroup. > > Cor > > >
Converted code
Bug with VS.NET inheriting from a control Export Data to Excel VB.NET Automatic code typing features "ambiguous" problem with VB.NET 2005 ListView.SelectedItems.Clear if result = system.dbnull how to load a .csv file to a temporary table in sql 2000 load .csv data to a datagrid How to provide trial version of software ? |
|||||||||||||||||||||||