Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Excel Errors / February 2006

Tip: Looking for answers? Try searching our database.

Why would a command button move after print preview?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Alan T - 27 Feb 2006 20:01 GMT
On a HP laptop Excel 2002 the command buttons move to the right each time a
print preview is done. This does not happen on a desktop running the same
software or on another laptop & desktop with Excel 2003. I assume it is a
setting of some sort on the Laptop but have no idea what to look at any
sugestions?
Ken Wright - 27 Feb 2006 22:33 GMT
The reason:-

http://support.microsoft.com/default.aspx?scid=kb;EN-US;838910
Controls move to the left of the worksheet in Microsoft Excel 2002

But Jim Rech recently posted this:

This article is now obsolete. Since the 10/12/2004 security patch
there is no need to get a hotfix (although this article does not directly
mention this fix, it's in there).

http://support.microsoft.com/default.aspx?scid=kb;en-us;832332

But Myrna Larson posted that it didn't work for her in all her workbooks.

To apply the workaround to a number of controls, Dave Peterson recently
posted this:-

Maybe you could use a macro to fix the controls on the sheet.

If you want to change every OLEObject, you could do this:

Option Explicit
Sub testme01()

   Dim OLEObj As OLEObject
   Dim wks As Worksheet

   For Each wks In ActiveWorkbook.Worksheets
       For Each OLEObj In wks.OLEObjects
           OLEObj.Placement = xlMoveAndSize
       Next OLEObj
   Next wks

End Sub

If you want to be more conservative and only fiddle with the checkboxes:

Sub testme02()

   Dim OLEObj As OLEObject
   Dim wks As Worksheet

   For Each wks In ActiveWorkbook.Worksheets
       For Each OLEObj In wks.OLEObjects
           If TypeOf OLEObj.Object Is MSForms.CheckBox Then
               OLEObj.Placement = xlMoveAndSize
           End If
       Next OLEObj
   Next wks

End Sub

Signature

Regards
          Ken.......................    Microsoft MVP - Excel
             Sys Spec - Win XP Pro /  XL 97/00/02/03

------------------------------­------------------------------­----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------­------------------------------­----------------

> On a HP laptop Excel 2002 the command buttons move to the right each time
> a
> print preview is done. This does not happen on a desktop running the same
> software or on another laptop & desktop with Excel 2003. I assume it is a
> setting of some sort on the Laptop but have no idea what to look at any
> sugestions?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.