ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   userform (https://www.excelbanter.com/excel-programming/282908-userform.html)

billQ

userform
 
Hello,
I would like to align a userform to open with the upper lefthand corner at
cell A1
thanks
bill



Tom Ogilvy

userform
 
See Chip Pearson's page on this topic:

http://www.cpearson.com/excel/FormPosition.htm

--
Regards,
Tom Ogilvy


billQ wrote in message
...
Hello,
I would like to align a userform to open with the upper lefthand corner at
cell A1
thanks
bill





Rick[_19_]

userform
 
I have no idea if this would work with an Excel userform
with VBA. (But it might - I'd have to play around with it
some to tell for sure.)

Try researching the API function "SetWindowPos" on the
internet. Forms are windows, so it works (at least I know
using VB6).

I don't know if there is an easier way, but that's one
method I've used with VB6. I haven't played around with
it long enough to know everything about it. Mainly, I
just wanted the VB6 form to stay on top, so I could see
and use it all the time. My VB6 form automatically shows
up in the top left corner, because of the zeros I have in
place (I think). I just started using it recently - so
this is a new technique for me.

On my form I give the user to option to "shut off" this
position. My VB6 form is similar to "vbModeless" VBA
Excel forms.

If this isn't a crazy idea, and no-one can think of
anything better - I'll give you the code if you want - to
test it. It's available on the internet too.

-----Original Message-----
Hello,
I would like to align a userform to open with the upper

lefthand corner at
cell A1
thanks
bill


.


Rick[_19_]

userform
 
Thanks Tom,

I just downloaded Chip's file. He put a lot of work into
developing that one. There's a lot of well-thought-out
code. I played around with it some. It will be fun to
look at it in more detail later.

The form shows up relative to the activecell on the
worksheet, so it seems. I suppose, like almost
everything, it could be modifed to do whatever someone
wished.

Rick

-----Original Message-----
See Chip Pearson's page on this topic:

http://www.cpearson.com/excel/FormPosition.htm

--
Regards,
Tom Ogilvy


billQ wrote in message
...
Hello,
I would like to align a userform to open with the upper

lefthand corner at
cell A1
thanks
bill




.



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

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com