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

Is there a way to change the position of Userform to a pre
determined location on a spread sheet?

I want my userform to cove up a range of cells so the user
can't see what's underneath until it is closed. Which
would then beg the question of, can you stop a user from
moving the userform?

Any thoughts
Pete
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7,247
Default Userform Position

Pete,

You might find my Form Positioner workbook useful. See
http://www.cpearson.com/excel/FormPosition.htm .


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Pete" wrote in message
...
Is there a way to change the position of Userform to a pre
determined location on a spread sheet?

I want my userform to cove up a range of cells so the user
can't see what's underneath until it is closed. Which
would then beg the question of, can you stop a user from
moving the userform?

Any thoughts
Pete



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

Hi Chip,

I had successfully used your Form Positioner workbook on an freeware
Excel I wrote, using Excel 2000. But, when people load my application
into Excel 2003 it runs into compile problems, particularly with the
statement:

PS = PositionForm(WhatForm:=frmInput, AnchorRange:=ActiveCell,
HorizOrientation:=HO, VertOrientation:=VO)

It errors out with a "Type Mismatch" error.

The odd thing is that I don't get this error with the other forms in my
application that are called with the exactly the same code. The only
difference is the specific user form I'm calling up. Do you know how I
can fix this for Excel 2003? Thanks.

Bob Kaku


Chip Pearson wrote:
Pete,

You might find my Form Positioner workbook useful. See
http://www.cpearson.com/excel/FormPosition.htm .


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com

"Pete" wrote in message
...
Is there a way to change the position of Userform to a pre
determined location on a spread sheet?

I want my userform to cove up a range of cells so the user
can't see what's underneath until it is closed. Which
would then beg the question of, can you stop a user from
moving the userform?

Any thoughts
Pete


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,080
Default Userform Position

As far as locking the position is concerned, this old post of mine may help:

http://google.com/groups?selm=%23yhr...ngp04&rnum= 1

--

Vasant

"Pete" wrote in message
...
Is there a way to change the position of Userform to a pre
determined location on a spread sheet?

I want my userform to cove up a range of cells so the user
can't see what's underneath until it is closed. Which
would then beg the question of, can you stop a user from
moving the userform?

Any thoughts
Pete



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 214
Default Userform Position

Hi Pete;
Private Declare Function GetActiveWindow Lib "user32" () As Long
Private Declare Function DrawMenuBar Lib "user32" (ByVal hwnd As Long) As
Long
Private Declare Function RemoveMenu Lib "user32" (ByVal hMenu As Long _
, ByVal nPosition As Long, ByVal wFlags As Long) As Long
Private Declare Function GetSystemMenu Lib "user32" (ByVal hwnd As Long _
, ByVal bRevert As Long) As Long

Private Sub UserForm_Activate()
Move 100, 100
Dim hSysMenu As Long
hSysMenu = GetSystemMenu(GetActiveWindow(), False)
RemoveMenu hSysMenu, 1, &H400
DrawMenuBar hSysMenu
End Sub

MP

"Pete" a écrit dans le message de
...
Is there a way to change the position of Userform to a pre
determined location on a spread sheet?

I want my userform to cove up a range of cells so the user
can't see what's underneath until it is closed. Which
would then beg the question of, can you stop a user from
moving the userform?

Any thoughts
Pete





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
There is no row at position 0 Catbean Excel Discussion (Misc queries) 1 November 21st 08 11:24 PM
UserForm position Steve Excel Discussion (Misc queries) 1 August 26th 07 04:50 AM
Look up a value which position changes. David_in_AUS Excel Discussion (Misc queries) 1 June 13th 06 09:01 AM
How can I fix the position of a row [email protected] Excel Discussion (Misc queries) 3 June 8th 06 10:27 PM
.position chazman Charts and Charting in Excel 4 February 28th 05 02:26 AM


All times are GMT +1. The time now is 02:51 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"