Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 74
Default excel form activation in macro?

I have learned how to activate a form to fill in data that starts in A1. I
would like to be able to place my data table at another location (ie c25:h50)
and activate the form to fill it.

The syntax below opens a form that is located at A1... I tried making the
range of my data table be at c25:h50 using a... " range ("c25:h50").select"
.... statement and the form always defaults to what is at A1?

Private Sub CommandButton1_Click()
Range("A1").Select
ShowDataForm
End Sub

Also does the form that im using have to be on the same page as the data
table that im filling?


--
dr chuck

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default excel form activation in macro?

A userform is not associated with a particular range or worksheet for that
matter.
Userform.StartUpPosition gives you a few built in options.
If you want it in a particular position, set StartUpPosition to manual and
move it yourself.
Bear in mind that you will have to do some calculation to get the
measurements correct, as the Range.Top is "The distance from the top edge of
row 1 to the top edge of the range" whilst the userform.Top is absolute on
the screen.

NickHK

"dr chuck" wrote in message
...
I have learned how to activate a form to fill in data that starts in A1. I
would like to be able to place my data table at another location (ie

c25:h50)
and activate the form to fill it.

The syntax below opens a form that is located at A1... I tried making the
range of my data table be at c25:h50 using a... " range

("c25:h50").select"
... statement and the form always defaults to what is at A1?

Private Sub CommandButton1_Click()
Range("A1").Select
ShowDataForm
End Sub

Also does the form that im using have to be on the same page as the data
table that im filling?


--
dr chuck



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 49
Default excel form activation in macro?

my understanding is that you currently have a userform which sends data to
cell A1 and you want it instead to send data to cell C25 to H50.

your code below does not control where the data from the userform goes; that
will be controlled by the userform itself. For example, if you have an 'OK'
button on the userform, open the userform in the editor and double click the
'OK' button and it should show any code relating to that button; that is
where i would normally place the code which tells the userform where to put
the data (in your case, it sounds like you are telling it to go to cell A1
somewhere in teh userform)

hth,

tim

"dr chuck" wrote in message
...
I have learned how to activate a form to fill in data that starts in A1. I
would like to be able to place my data table at another location (ie
c25:h50)
and activate the form to fill it.

The syntax below opens a form that is located at A1... I tried making the
range of my data table be at c25:h50 using a... " range
("c25:h50").select"
... statement and the form always defaults to what is at A1?

Private Sub CommandButton1_Click()
Range("A1").Select
ShowDataForm
End Sub

Also does the form that im using have to be on the same page as the data
table that im filling?


--
dr chuck



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
form activation? dr chuck Excel Programming 0 August 6th 06 10:32 PM
"combination drop-down edit " form activation in Excel Trev Excel Discussion (Misc queries) 1 March 4th 05 03:26 AM
Excel macro activation. Christine Flott[_2_] Excel Programming 1 July 30th 03 02:35 PM
Excel macro activation. Pete McCosh[_3_] Excel Programming 0 July 29th 03 04:59 PM
Excel macro activation. Dick Kusleika Excel Programming 0 July 29th 03 04:47 PM


All times are GMT +1. The time now is 12:42 PM.

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"