Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Excel VBA - Show userform at the right top when activated

Posted on 2011-09-06
16
Medium Priority
?
431 Views
Last Modified: 2012-05-12
I have a form that pops up with a macro or upon initialzation.using the code

frmIntro.Show vbModeless

How can I make this come up in the upper right hand corner of the spreadsheet window?

Thanks, Eric
0
Comment
Question by:ekaplan323
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 3
16 Comments
 
LVL 31

Expert Comment

by:gowflow
ID: 36489440
put this

frmIntro.Show vbModeless
frmIntro.left = 0
frmIntro.top=0

gowflow
0
 
LVL 31

Accepted Solution

by:
gowflow earned 2000 total points
ID: 36489618
Ooops you said upper right hand corner !!! Sorry
What I discribed before was the upper left corner.

Here is the Upper right Corner
frmIntro.Show vbModeless
frmIntro.Left = ActiveWindow.Width - frmIntro.Width - 15
frmIntro.top=0

gowflow
0
 

Author Comment

by:ekaplan323
ID: 36490229
Gowflow,

Thanks, it works but you could just explain the code on line :
 frmIntro.Left = ActiveWindow.Width - frmIntro.Width - 15
So that I can understand this for future applications

Thanks, Eric

0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 12

Expert Comment

by:sdwalker
ID: 36490853
He is seeing how wide the Excel window is and then subtracting the width of the form window.  This would put your form at the extreme right edge of the window.  He is then subtracting 15 more pixels so that it resides within the boundary of the Excel application.

At least that's how I see it.

sdwalker
0
 

Author Comment

by:ekaplan323
ID: 36491629
I've requested that this question be closed as follows:

Accepted answer: 0 points for ekaplan323's comment http:/Q_27293237.html#36490229

for the following reason:

Simple solution that works
0
 
LVL 31

Expert Comment

by:gowflow
ID: 36491630
I gave you the solution and why on earth you accept your comment as a solution with zero points ??? Not that I am after points but I strictly do not get it !!!
gowflow
0
 
LVL 12

Expert Comment

by:sdwalker
ID: 36491640
Me neither. That's nuts! Maybe he doesn't know what he did.
0
 
LVL 31

Expert Comment

by:gowflow
ID: 36491656
Well I objected to his closure It's the first time ever since I am member in EE !!!
:(
gowflow
0
 
LVL 31

Expert Comment

by:gowflow
ID: 36491700
ekaplan323
Sorry for my quick comment but I guess you closed the question wrongly. If yes and it is the case you need to click on the answer that you feel is the correct answer for you. If still you choose for your answer to be please explain as we do not understand. If you feel multiple answers get to be chosen then you click on each and you attribute points to each
gowflow
0
 

Author Comment

by:ekaplan323
ID: 36496500
I've requested that this question be closed as follows:

Accepted answer: 0 points for ekaplan323's comment http:/Q_27293237.html#36490229
Assisted answer: 500 points for gowflow's comment http:/Q_27293237.html#36489440

for the following reason:

Great solution simple
0
 
LVL 31

Expert Comment

by:gowflow
ID: 36496266
I still don't get it !!! but it is beyond the scope of my intelligence !
gowflow
0
 
LVL 12

Expert Comment

by:sdwalker
ID: 36496499
Question was correctly answered
0
 

Author Comment

by:ekaplan323
ID: 36496606
Sorry for the misunderstaning, must have clicked the wrong button and I thought I corrected it by awarding the points to goflow.  I guess that didn't quite do it huh
0
 
LVL 31

Expert Comment

by:gowflow
ID: 36496799
yes it didn't !
gowflow
0

Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Freeze panes is an option within all variants of Excel to enable parts of a sheet to remain stationary when the cursor is in another part of the sheet. This is a very useful feature which is overlooked or under used.
After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
This Micro Tutorial will demonstrate in Google Sheets how to use the HYPERLINK function to create live links inside your spreadsheet.

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question