View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.programming
John Bundy John Bundy is offline
external usenet poster
 
Posts: 772
Default With Application; Me.Top = ...

Ah, must have missed that part. In that case just use me.top, no application
is neccesary.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"David" wrote:

Thanks John,
The code is in a userform 'Activate' procedure
The 'me' must be referring to the userform
The 'with structure' in the original post sets the initial position of the
userform and not the excel application. (Your code sets the position of the
excel application on the screen)
Could you advise further on how the code is working? ie: How to write the
instructions without the 'With'
Thanks again

"John Bundy" wrote:

the me is not necessary, you can just use
with application
.top=0
.left=625
end with

I use the me's as well. So just typing it without the with:
application.top=0
application.left=625

the with just lets you set multiple properties without retyping application.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"David" wrote:

With Application
Me.Top = 0
Me.Left = 625
End With

Just hoping to advance my knowledge..
An old post of Norman Jones gave the above solution to initial positioning
of a userform on the screen using a With structure - works great.
I use 'With Structures' but this code is in a form that I've not come across
yet so it caught my eye.
I tried to educate myself by typing out the instruction without the With
Structure, eg: Application.me.top etc but I'm obviously missing a trick. Can
anyone advise what the code looks like without the 'With'?
Thanks in advance