|
-
Aug 2nd, 2012, 05:30 AM
#1
Thread Starter
Junior Member
How to add value to a combobox which is on a worksheet (not form)
"My problem is that I cant give value to a combobox in the way that I want to!
"code place was here"
This works fine, if I run the program from the VB editor, but if a user opens the xls document, there will be no options to choose from in the combobox.
How can I do that, when the user opens, those items are already in the combobox?
I'm beginner to this, but I don't have time to learn just for the beginnings!"
I figured out that problem. I had to put the code into the Private Sub Workbook_Open() section!
Now another question:
I have this xls file (teszt2-.zip) where the user have to enter, the author, year of publications etc, and then with a record button i have to copy those cells value to the Recorded items section (Like A4 cell value to A9, B4 value to B9, C4 value to C9, and D4 value to D9)
How is it possible?
I can do it for one record like this:
Code:
Range("A9").Value = Range("A4").Value
Range("B9").Value = Range("B4").Value
Range("C9").Value = Range("C4").Value
Range("D9").Value = ComboBox1.Value
But this is not good because I have to do it as much as the user hits the record button.
So every of the new record have to be in a new line, with every button hit!
Last edited by Gülredy; Aug 2nd, 2012 at 06:13 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|