Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using ActiveWindow.PointsToScreenPixelsY

I am trying to use the ActiveWindow.PointsToScreenPixelsY
and all I have is a zero, as response.
I tryed:
hMap=ActiveWindow.PointsToScreenPixelsY(1)
hMap=ActiveWindow.PointsToScreenPixelsY(10)
hMap=ActiveWindow.PointsToScreenPixelsY(100)
hMap=ActiveWindow.PointsToScreenPixelsY(1000)

hMap is a Long variable, in all cases I obtained a zero.
I am using it on Excel 2000, with Windows 2000.

Any suggestions?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Using ActiveWindow.PointsToScreenPixelsY

I get the same result when running from VB.
But if I create a macro and run that macro from an Excel button, then it
works.

Doesn't seem to like runnig from VB

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Pancho" wrote in message
...
I am trying to use the ActiveWindow.PointsToScreenPixelsY
and all I have is a zero, as response.
I tryed:
hMap=ActiveWindow.PointsToScreenPixelsY(1)
hMap=ActiveWindow.PointsToScreenPixelsY(10)
hMap=ActiveWindow.PointsToScreenPixelsY(100)
hMap=ActiveWindow.PointsToScreenPixelsY(1000)

hMap is a Long variable, in all cases I obtained a zero.
I am using it on Excel 2000, with Windows 2000.

Any suggestions?



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Using ActiveWindow.PointsToScreenPixelsY

Is that because the activewindow is the VBE?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rob van Gelder" wrote in message
...
I get the same result when running from VB.
But if I create a macro and run that macro from an Excel button, then it
works.

Doesn't seem to like runnig from VB

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Pancho" wrote in message
...
I am trying to use the ActiveWindow.PointsToScreenPixelsY
and all I have is a zero, as response.
I tryed:
hMap=ActiveWindow.PointsToScreenPixelsY(1)
hMap=ActiveWindow.PointsToScreenPixelsY(10)
hMap=ActiveWindow.PointsToScreenPixelsY(100)
hMap=ActiveWindow.PointsToScreenPixelsY(1000)

hMap is a Long variable, in all cases I obtained a zero.
I am using it on Excel 2000, with Windows 2000.

Any suggestions?





  #4   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Using ActiveWindow.PointsToScreenPixelsY

Thanks BOB that was the reason , I was seeing in Debug
mode.
Sorry for the lapsus,
Thanks



-----Original Message-----
Is that because the activewindow is the VBE?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rob van Gelder"

wrote in message
...
I get the same result when running from VB.
But if I create a macro and run that macro from an

Excel button, then it
works.

Doesn't seem to like runnig from VB

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Pancho" wrote in

message
...
I am trying to use the

ActiveWindow.PointsToScreenPixelsY
and all I have is a zero, as response.
I tryed:
hMap=ActiveWindow.PointsToScreenPixelsY(1)
hMap=ActiveWindow.PointsToScreenPixelsY(10)
hMap=ActiveWindow.PointsToScreenPixelsY(100)
hMap=ActiveWindow.PointsToScreenPixelsY(1000)

hMap is a Long variable, in all cases I obtained a

zero.
I am using it on Excel 2000, with Windows 2000.

Any suggestions?





.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Using ActiveWindow.PointsToScreenPixelsY

The real problem, seems to be related with the instruction
Application.screenUpdating=False


Thanks



-----Original Message-----
Is that because the activewindow is the VBE?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rob van Gelder"

wrote in message
...
I get the same result when running from VB.
But if I create a macro and run that macro from an

Excel button, then it
works.

Doesn't seem to like runnig from VB

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Pancho" wrote in

message
...
I am trying to use the

ActiveWindow.PointsToScreenPixelsY
and all I have is a zero, as response.
I tryed:
hMap=ActiveWindow.PointsToScreenPixelsY(1)
hMap=ActiveWindow.PointsToScreenPixelsY(10)
hMap=ActiveWindow.PointsToScreenPixelsY(100)
hMap=ActiveWindow.PointsToScreenPixelsY(1000)

hMap is a Long variable, in all cases I obtained a

zero.
I am using it on Excel 2000, with Windows 2000.

Any suggestions?





.



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,236
Default Using ActiveWindow.PointsToScreenPixelsY

I thought it might have been, so I msgboxed ActiveWindow.Caption and it came
back as Book1.

In fact: MsgBox Windows("Book1").PointsToScreenPixelsY(1000) comes back as
0. Yet if I hit ALT+F8 from Excel and run my macro then it gives a result.

Maybe it's a bug.

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Bob Phillips" wrote in message
...
Is that because the activewindow is the VBE?

--

HTH

Bob Phillips
... looking out across Poole Harbour to the Purbecks
(remove nothere from the email address if mailing direct)

"Rob van Gelder" wrote in message
...
I get the same result when running from VB.
But if I create a macro and run that macro from an Excel button, then it
works.

Doesn't seem to like runnig from VB

--
Rob van Gelder - http://www.vangelder.co.nz/excel


"Pancho" wrote in message
...
I am trying to use the ActiveWindow.PointsToScreenPixelsY
and all I have is a zero, as response.
I tryed:
hMap=ActiveWindow.PointsToScreenPixelsY(1)
hMap=ActiveWindow.PointsToScreenPixelsY(10)
hMap=ActiveWindow.PointsToScreenPixelsY(100)
hMap=ActiveWindow.PointsToScreenPixelsY(1000)

hMap is a Long variable, in all cases I obtained a zero.
I am using it on Excel 2000, with Windows 2000.

Any suggestions?







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
Creating a Powerpoint object (in XP onwards) with an ActiveWindow BizMark Excel Discussion (Misc queries) 0 August 12th 05 12:46 PM


All times are GMT +1. The time now is 10:03 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"