PC Review


Reply
Thread Tools Rate Thread

Column width reset

 
 
Andy Thomas
Guest
Posts: n/a
 
      9th Jul 2008
I have just started to experience a very strange problem that
hopefully someone may recognise.

Note that this only happening on my machine and the code runs
perfectly well on other machines . The problem has only come to light
since our support desk made a change to my Windows profile. The
problem may be caused by this change but I am hoping expert Excel
resources may be able to help explain the problem.

I have code to populate worksheets with data, within which I check for
pagebreaks and add lines and text to get around natural constraints
that Excel has for page headers. However, when I run the following
line (even if this returns False) Excel changes the column widths of
columns to a large random value (usually 255 pts)

If Worksheets(strsheetname).Rows(introw).PageBreak <> xlNone Then

In have stepped through the code and actually can see the worksheet
format change as this line is processed.

Thanks for any feedback.
 
Reply With Quote
 
 
 
 
Jim Rech
Guest
Posts: n/a
 
      9th Jul 2008
I have no idea why it would cause this problem but since you've had your
profile changed and because it involves printing, I'd suggest seeing what
happens if you change to another printer. Even a pretend one like Adobe or
MS XPS in the File, Print dialog.

--
Jim
"Andy Thomas" <(E-Mail Removed)> wrote in message
news:6aab13ef-786e-4908-8817-(E-Mail Removed)...
|I have just started to experience a very strange problem that
| hopefully someone may recognise.
|
| Note that this only happening on my machine and the code runs
| perfectly well on other machines . The problem has only come to light
| since our support desk made a change to my Windows profile. The
| problem may be caused by this change but I am hoping expert Excel
| resources may be able to help explain the problem.
|
| I have code to populate worksheets with data, within which I check for
| pagebreaks and add lines and text to get around natural constraints
| that Excel has for page headers. However, when I run the following
| line (even if this returns False) Excel changes the column widths of
| columns to a large random value (usually 255 pts)
|
| If Worksheets(strsheetname).Rows(introw).PageBreak <> xlNone Then
|
| In have stepped through the code and actually can see the worksheet
| format change as this line is processed.
|
| Thanks for any feedback.


 
Reply With Quote
 
Andy Thomas
Guest
Posts: n/a
 
      11th Jul 2008
Thanks Jim, though printing isn't involved. This behaviour occurs
when formatting data on a spreadsheet.
 
Reply With Quote
 
Jim Rech
Guest
Posts: n/a
 
      11th Jul 2008
Andy-

I know you weren't print. That's not the point. Excel uses the print
driver internally anytime you do something involving printing, like setting
page breaks.

--
Jim
"Andy Thomas" <(E-Mail Removed)> wrote in message
news:c2f05ad3-bdb0-4d56-8210-(E-Mail Removed)...
| Thanks Jim, though printing isn't involved. This behaviour occurs
| when formatting data on a spreadsheet.


 
Reply With Quote
 
Andy Thomas
Guest
Posts: n/a
 
      16th Jul 2008
Thanks Jim - I've changed printers and this has sorted it. Thanks
again.
 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
cannot paste source column width to destination column width transkawa Microsoft Excel New Users 1 15th Oct 2010 04:09 PM
Dynamically Resize Gridview Width Property (NOT Column Width) Hartman_Ralph@Hotmail.com Microsoft ASP .NET 0 2nd Jun 2009 04:59 PM
Create a macro which takes a column name and width and sets the column width to what it should be Ag Microsoft Excel Programming 4 29th Sep 2007 11:29 PM
How to reset column to standard width? Rich Pasco Microsoft Excel Discussion 12 13th Dec 2003 10:24 AM
Re: Reset column width to default Dave Peterson Microsoft Excel Misc 7 20th Aug 2003 04:58 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 08:46 AM.