Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default Userform Comboboxes - need a quick how to..

I read an article lastnight by Frank Rice about MS object model programming. It contained info about userforms which I have shyed away from until now as I didn't know how they worked. I have a need to use one now as I suspect they will be cleaner and more efficient than combo boxes and data validation lists on the sheets (which are doing funny things like moving around the page or point blank refusing to work, I don't know why!).

My Question is how exactly do I get a combo or list box to work in a userform. I want to be able to populate the combo box in the userform with five named cells, job1, job2, job3 etc. I then want to be able to select the "job" that I want from the list in the combo box and have the procedure in the macro input that value into a cell in the destination workbook and hide the combo box.
Roger W
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Userform Comboboxes - need a quick how to..

You need to be in the VBA editor, then right click on the left hand sid
where it says sheet1 sheet2 etc then select insert and userform, ad
your buttons and text, now for the job selection......type a list o
your jobs on a sheet highlight the range and in the formula bar on th
left hand side there is a small range window click in this and type
name for you range, now go back to your userform and in the propertie
window on the left scroll down untill you see row source then type you
list name in here, view the code for the combobox1 and typ
activecell.value=combobox1.value and on the next line type me.hide

In the code page for a worksheet select from the top dropdown bo
worksheet and from the one on the left select selectionchangenow on th
next line after sub type userform1.show.

this is the basis of the userform, have a play around with the setting
and captions to suit your needs.

Have fun!

Simo

--
Message posted from http://www.ExcelForum.com

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
Comboboxes mr-bear New Users to Excel 1 November 21st 06 10:05 AM
Need help with ComboBoxes. rosemary New Users to Excel 2 July 9th 05 12:19 AM
ComboBoxes Ryan Excel Programming 0 April 14th 04 10:56 PM
Multiple ComboBoxes and TextBoxes on Userform Rich J Excel Programming 6 January 27th 04 07:51 PM
Several comboBoxes on a Userform mor.mic Excel Programming 3 October 1st 03 09:44 PM


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

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"