![]() |
![]() |
|
|||||||
| Excel Questions All Excel/VBA questions - formulas, macros, pivot tables, general help, etc. Please post to this forum in English only. |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,384
|
Ok. I give. I've gotten so far by myself, and was doing so well without having to ask a question, but nooooo...this had to "stump me", as it were.
On my userform, I will enter a page number in TextBox3, and select a year from ComboBox1. So if I enter 123 in the textbox (however this can be a 1 to 3 digit number), then choose either ('00) or ('01) from the combobox. How can I have these both end up in cell C3 as 123 ('00)? I've been messing with it all afternoon, and am severely stuck. Thanks, _________________ ~*Kristy*~ "Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam." [ This Message was edited by: Von Pookie on 2002-05-21 12:54 ] |
|
|
|
|
|
#2 |
|
Join Date: Feb 2002
Posts: 3,063
|
Hi Kristy
your need VBA to do this can you post you code so far ill have a play see if i can make something usable
__________________
Free Excel based Web Toolbar available here. Jack in the UK J & R Excel Solutions "making Excel work for you" |
|
|
|
|
|
#3 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,384
|
I wasn't sure if anyone would need the code or not. Here you go, Jack:
_________________ ~*Kristy*~ "Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam." [ This Message was edited by: Von Pookie on 2002-05-20 16:05 ] |
|
|
|
|
|
#4 |
|
MrExcel MVP
Admin Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,639
|
Hi Kristy, does changing
Range("$C$3") = TextBox3.Value to Range("$C$3") = TextBox3.Value & " " & ComboBox1.Value Help? |
|
|
|
|
|
#5 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,384
|
Yay! Yes it did! I was closer today than I thought I was
But, now, after I click ok (commandbutton1) and add it to my listing, then I click cancel (commandbutton2) to "hide" the form and now it's telling me: "the macro test2.xls'!DropDown_ComboBox' cannot be found." Obviously, it didn't do this before. Why would it start this now? Strange...I just added it to the exact same workbook here at work, and it worked fine. Methinks the laptop may be a bit screwy with VBA (it is running a different version of Excel Thanks, Nate _________________ ~*Kristy*~ "Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam." [ This Message was edited by: Von Pookie on 2002-05-21 06:02 ] |
|
|
|
|
|
#6 | |
|
MrExcel MVP
Admin Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,639
|
Hello Kristy,
Quote:
For Each Ctl In UserForm1.Controls instead. |
|
|
|
|
|
|
#7 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,384
|
The most amazing thing just happened. I started getting that message here at work, too, right before I saw this response. What timing
Now it's started to do it after I added a message box to come up if certain textboxes are blank. It was working fine until I got the message box to work like I want it to, of course. What I added before it started is in red. I've changed all of the me.controls to UserForm1.controls, as well. Still doing it.
Thanks, _________________ ~*Kristy*~ "Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam." [ This Message was edited by: Von Pookie on 2002-05-21 09:24 ] |
|
|
|
|
|
#8 |
|
MrExcel MVP
Admin Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,639
|
How are you launching the userform (if by button, try reassigning the button's procedure)?
I can't see anything in your code linking externally. |
|
|
|
|
|
#9 |
|
MrExcel MVP
Admin Join Date: Feb 2002
Location: Minneapolis, Mn, USA
Posts: 9,639
|
Found the issue in your original code posting in the combobox1_click procedure:
Must be a procedure that's no longer available, you'll want to correct this code, if not necessary, eliminate it. _________________ Cheers, NateO [ This Message was edited by: NateO on 2002-05-21 10:50 ] |
|
|
|
|
|
#10 |
|
MrExcel MVP, Administrator
Join Date: Feb 2002
Location: The act or process of locating.
Posts: 13,384
|
You snuck in there on me
I deleted the line, and ended up changing where the source row is, which I changed in the code and in the properties for the combobox. So, now I have ComboBox1.RowSource = ("Products!I1:K1") And nothing is coming up when I click on the drop down arrow in the combobox. On the bright side, I'm not getting that error anymore _________________ ~*Kristy*~ "Catapultam habeo. Nisi pecuniam omnem mihi dabis, ad caput tuum saxum immane mittam." [ This Message was edited by: Von Pookie on 2002-05-21 11:06 ] |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|