ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   first user form..... (https://www.excelbanter.com/excel-programming/417304-first-user-form.html)

SteveDB1

first user form.....
 
hi all.
I've finished making my first user form with labels, textboxes, some
images-- for clarification-- and OK, Cancel buttons.

My first question is:
For my present (pre-user form) configuration, I'm using
application.inputbox(prompt:="...", type:=N) for my inputs (where N is either
1, 2, or 8 denpending on the requirements).

I've renamed all of my textboxes on my form to be identical to my inputs'
variable names.

What do I do with the application.inputboxes? What changes do I make here?

My next question:

If I understand this correctly, I'm to take my current sub, and place the
entire code within the code for the

Private Sub OK_Click()

'macro code goes here?

End Sub

code, correct?

Then, for my final question for this post:

What about the "control as IRibbonControl" within my paren's that allows me
to access this macro through the ribbon?
I'd like to keep it accessible through the Ribbon.


Thank you for your responses.
Best.
SteveB.


SteveDB1

first user form.....
 
Hi Chip,
thanks for the response.
I saw the RefEdit tool in the toolbox.
So if I understand this correctly, instead of textboxes, I want a RefEdit?
Sounds like I need to do some more reading.


"Chip Pearson" wrote:

If you want the user to be able to select a range from a UserForm, you need
to use the RefEdit control. In the VBA UserForm Toolbox, choose Additional
Controls and choose RefEdit in the list.


--
Cordially,
Chip Pearson
Microsoft Most Valuable Professional
Excel Product Group
Pearson Software Consulting, LLC
www.cpearson.com
(email on web site)



"SteveDB1" wrote in message
...
hi all.
I've finished making my first user form with labels, textboxes, some
images-- for clarification-- and OK, Cancel buttons.

My first question is:
For my present (pre-user form) configuration, I'm using
application.inputbox(prompt:="...", type:=N) for my inputs (where N is
either
1, 2, or 8 denpending on the requirements).

I've renamed all of my textboxes on my form to be identical to my inputs'
variable names.

What do I do with the application.inputboxes? What changes do I make
here?

My next question:

If I understand this correctly, I'm to take my current sub, and place the
entire code within the code for the

Private Sub OK_Click()

'macro code goes here?

End Sub

code, correct?

Then, for my final question for this post:

What about the "control as IRibbonControl" within my paren's that allows
me
to access this macro through the ribbon?
I'd like to keep it accessible through the Ribbon.


Thank you for your responses.
Best.
SteveB.




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

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