Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Print Preview + Coordinate Problem

Hi there,

I'm having a trouble with Excel 2003, and I've looked for an answer
all day without success, so I thought someone could help me.

We have a workbook containing lots of info the user needs to fill. To
help the user, some of those sheets have a QuickHelp routine - an "?"
icon that is displayed near the field, and when the user clicks the
icon it shows a Help document with the info about that field.

To do this, I created a sub who would do the job, and in the selection
change event I called this function, like the following:

Private Sub Worksheet_SelectionChange(ByVal target As Range)
ShowQuickHelp
End Sub


Sub ShowQuickHelp()

Dim sheetActive As Worksheet
Set sheetActive = ActiveSheet

' Hides the old shape, showing only the new one.
If Not shapeQuickHelp Is Nothing Then
shapeQuickHelp.Visible = msoFalse
End If

If MustShowQuickHelp = True Then
Set shapeQuickHelp =
sheetActive.Shapes(Range(RANGE_QuickHelpShape).Val ue)

shapeQuickHelp.Visible = True
shapeQuickHelp.Top = ActiveCell.Top + 1.3
shapeQuickHelp.Left = ActiveCell.Left + 1.5

' The command below asign the specific macro to each shape.
shapeQuickHelp.OnAction = Range(RANGE_QuickHelpMacro).Value
End If

Set sheetActive = Nothing

End Sub

This routine works perfectly, until the user calls the "Print Preview"
comand. When this occurs, some of the sheets (about half of them) go
crazy, and start to mix coordinates - Instead of displaying the icon
in the correct cell, according with the cell top and left coordinates,
the icon is displayed in another place.

I debbuged the routine, and notice that the ActiveCell continues to
represent the correct cell, the coordinates continue the same, but
somehow the Excel starts to understand Top and Left in a different way
from before. For example, Top = 100 represents a diferent position
before/after the print preview.

The most unpleasant effect is that this just occur with half of the
sheets. The other half works perfectly.

Could someone help me please?

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Print Preview + Coordinate Problem

Another points I forgot to mention:

This occur when the user selects several sheets and uses the "Print
Preview" command. I also noticed that if I select each sheet alone and
click in "Print Preview", the problem stops.


On 16 abr, 17:18, wrote:
Hi there,

I'm having a trouble with Excel 2003, and I've looked for an answer
all day without success, so I thought someone could help me.

We have a workbook containing lots of info the user needs to fill. To
help the user, some of those sheets have a QuickHelp routine - an "?"
icon that is displayed near the field, and when the user clicks the
icon it shows a Help document with the info about that field.

To do this, I created a sub who would do the job, and in the selection
change event I called this function, like the following:

Private Sub Worksheet_SelectionChange(ByVal target As Range)
ShowQuickHelp
End Sub

Sub ShowQuickHelp()

Dim sheetActive As Worksheet
Set sheetActive = ActiveSheet

' Hides the old shape, showing only the new one.
If Not shapeQuickHelp Is Nothing Then
shapeQuickHelp.Visible = msoFalse
End If

If MustShowQuickHelp = True Then
Set shapeQuickHelp =
sheetActive.Shapes(Range(RANGE_QuickHelpShape).Val ue)

shapeQuickHelp.Visible = True
shapeQuickHelp.Top = ActiveCell.Top + 1.3
shapeQuickHelp.Left = ActiveCell.Left + 1.5

' The command below asign the specific macro to each shape.
shapeQuickHelp.OnAction = Range(RANGE_QuickHelpMacro).Value
End If

Set sheetActive = Nothing

End Sub

This routine works perfectly, until the user calls the "PrintPreview"
comand. When this occurs, some of the sheets (about half of them) go
crazy, and start to mix coordinates - Instead of displaying the icon
in the correct cell, according with the cell top and left coordinates,
the icon is displayed in another place.

I debbuged the routine, and notice that the ActiveCell continues to
represent the correct cell, the coordinates continue the same, but
somehow the Excel starts to understand Top and Left in a different way
from before. For example, Top = 100 represents a diferent position
before/after theprintpreview.

The most unpleasant effect is that this just occur with half of the
sheets. The other half works perfectly.

Could someone help me please?



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
Page Preview/Print Problem [email protected] New Users to Excel 3 December 31st 09 05:39 PM
Print Preview Problem in Excel Alex Excel Discussion (Misc queries) 1 August 19th 08 01:23 PM
print/preview problem before saving an edited excel worksheet SS Excel Discussion (Misc queries) 1 July 24th 08 12:00 PM
Problem w/Print Preview since upgrade to office 2003 Meenie Excel Discussion (Misc queries) 2 May 24th 07 06:16 PM
VBA Problem - Print Preview carljonesuk[_3_] Excel Programming 1 February 9th 04 03:39 PM


All times are GMT +1. The time now is 04:23 PM.

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"