Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Userform - placing

Hi,

I have created a userform which startups when the file opens.

I would like a specific placement different from the standard.

How do I have it to startup with its left corner in A18 for instance?

Mette

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11
Default Userform - placing

Select the form in VB, and Change the StartUpPosition to manual.

Then place the required position in the LEFT=


Corey....
"Mette" wrote in message
...
Hi,

I have created a userform which startups when the file opens.

I would like a specific placement different from the standard.

How do I have it to startup with its left corner in A18 for instance?

Mette



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Userform - placing

Hi Corey

Thanks for your answer.

I have tried this:

Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -30
UserForm1.Top = 20

UserForm1.Show

but nothing is changed. The UserForm still pop up in the middle of the
screen. What am I doing wrong?

"corey" skrev:

Select the form in VB, and Change the StartUpPosition to manual.

Then place the required position in the LEFT=


Corey....
"Mette" wrote in message
...
Hi,

I have created a userform which startups when the file opens.

I would like a specific placement different from the standard.

How do I have it to startup with its left corner in A18 for instance?

Mette




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Userform - placing

hi,

Right click your userform, View code and paste this in. Play with the
numbers to position it where you want.

Private Sub UserForm_Activate()
With UserForm1
.Top = Application.Top + 300 'Top - Bottom
.Left = Application.Left + 25 'Left - Right
End With
End Sub

Mike

"Mette" wrote:

Hi Corey

Thanks for your answer.

I have tried this:

Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -30
UserForm1.Top = 20

UserForm1.Show

but nothing is changed. The UserForm still pop up in the middle of the
screen. What am I doing wrong?

"corey" skrev:

Select the form in VB, and Change the StartUpPosition to manual.

Then place the required position in the LEFT=


Corey....
"Mette" wrote in message
...
Hi,

I have created a userform which startups when the file opens.

I would like a specific placement different from the standard.

How do I have it to startup with its left corner in A18 for instance?

Mette




  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Userform - placing

On 23 Sep, 11:24, Mette wrote:
Hi Corey

Thanks for your answer.

I have tried this:

Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -30
UserForm1.Top = 20

UserForm1.Show

but nothing is changed. The UserForm still pop up in the middle of the
screen. What am I doing wrong?

"corey" skrev:

Select the form in VB, and Change the StartUpPosition to manual.


Then place the required position in the LEFT=


Corey....
"Mette" wrote in message
...
Hi,


I have created a userform which startups when the file opens.


I would like a specific placement different from the standard.


How do I have it to startup with its left corner in A18 for instance?


Mette


That code works fine. Where have you put it?



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Userform - placing

Hi Duncan

I have put it in a Private Sub in another sheet (and also in the Private sub
Workbook_Open):

Private Sub CommandButton2_Click()
Sheets("Porteføljesammensætning").Select

Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -50
UserForm1.Top = 20

UserForm1.Show
End Sub

and it still pop up in the middle of the screen.

Mette

"Duncan" skrev:

On 23 Sep, 11:24, Mette wrote:
Hi Corey

Thanks for your answer.

I have tried this:

Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -30
UserForm1.Top = 20

UserForm1.Show

but nothing is changed. The UserForm still pop up in the middle of the
screen. What am I doing wrong?

"corey" skrev:

Select the form in VB, and Change the StartUpPosition to manual.


Then place the required position in the LEFT=


Corey....
"Mette" wrote in message
...
Hi,


I have created a userform which startups when the file opens.


I would like a specific placement different from the standard.


How do I have it to startup with its left corner in A18 for instance?


Mette


That code works fine. Where have you put it?


  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Userform - placing

On 23 Sep, 12:08, Mette wrote:
Hi Duncan

I have put it in a Private Sub in another sheet (and also in the Private sub
Workbook_Open):

Private Sub CommandButton2_Click()
Sheets("Porteføljesammensætning").Select

Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -50
UserForm1.Top = 20

UserForm1.Show
End Sub

and it still pop up in the middle of the screen.

Mette

"Duncan" skrev:

On 23 Sep, 11:24, Mette wrote:
Hi Corey


Thanks for your answer.


I have tried this:


Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -30
UserForm1.Top = 20


UserForm1.Show


but nothing is changed. The UserForm still pop up in the middle of the
screen. What am I doing wrong?


"corey" skrev:


Select the form in VB, and Change the StartUpPosition to manual.


Then place the required position in the LEFT=


Corey....
"Mette" wrote in message
...
Hi,


I have created a userform which startups when the file opens.


I would like a specific placement different from the standard.


How do I have it to startup with its left corner in A18 for instance?


Mette


That code works fine. Where have you put it?




Just done the same;

Private Sub CommandButton1_Click()

Worksheets("sheet1").Select
Load UserForm1
UserForm1.StartUpPosition = 0

UserForm1.Left = -50
UserForm1.Top = 20

UserForm1.Show

End Sub

Works no problems in Excel 2003 so your code is fine. Try adding an
extra line before the Show command;

msgbox "Left = " & str(userform1.left) & ", Top = " &
str(userform1.top)

...to see that it is getting this far ok.
  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5
Default Userform - placing

Thanks! It works fine.


"Mike H" skrev:

hi,

Right click your userform, View code and paste this in. Play with the
numbers to position it where you want.

Private Sub UserForm_Activate()
With UserForm1
.Top = Application.Top + 300 'Top - Bottom
.Left = Application.Left + 25 'Left - Right
End With
End Sub

Mike

"Mette" wrote:

Hi Corey

Thanks for your answer.

I have tried this:

Load UserForm1
UserForm1.StartUpPosition = 0
UserForm1.Left = -30
UserForm1.Top = 20

UserForm1.Show

but nothing is changed. The UserForm still pop up in the middle of the
screen. What am I doing wrong?

"corey" skrev:

Select the form in VB, and Change the StartUpPosition to manual.

Then place the required position in the LEFT=


Corey....
"Mette" wrote in message
...
Hi,

I have created a userform which startups when the file opens.

I would like a specific placement different from the standard.

How do I have it to startup with its left corner in A18 for instance?

Mette




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
Placing an UDF yshridhar Excel Worksheet Functions 11 August 17th 07 02:01 AM
Placing buttons etc on userform Gert-Jan Excel Programming 2 July 6th 06 03:11 PM
placing.. 1st, 2nd, 3rd... fivermsg Excel Discussion (Misc queries) 1 March 14th 06 02:21 AM
placing Stig Excel Worksheet Functions 0 February 3rd 05 10:30 PM
Placing a 'find'(ctrl+F) button in a UserForm abxy[_58_] Excel Programming 2 April 29th 04 03:16 AM


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