Visual Basic Programming
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
 
User Name:
Password:
Remember me
Go Back   ASP Free ForumsProgrammingVisual Basic Programming

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Rate Thread Display Modes
 
Unread ASP Free Forums Sponsor:
  #1  
Old April 15th, 2005, 07:58 AM
markoc's Avatar
markoc markoc is offline
Contributing User
ASP Free Regular (2000 - 2499 posts)
 
Join Date: Nov 2003
Location: UK
Posts: 2,151 markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level)markoc User rank is First Lieutenant (10000 - 20000 Reputation Level) 
Time spent in forums: 3 Weeks 18 h 10 m 15 sec
Reputation Power: 201
VBA question in Excel

I have a combobox, with 4 options, which is linked to C2 in excel and what I what to do is when onchange i want D2 updated as well.
So if combobox =1 then D2 = 0 and so on.

Can anyone please let me know how to do this.

Cheers I'm no a VBA person.

Reply With Quote
  #2  
Old April 27th, 2005, 04:56 AM
Marc Van Beeume Marc Van Beeume is offline
Registered User
ASP Free Newbie (0 - 499 posts)
 
Join Date: Apr 2005
Posts: 6 Marc Van Beeume User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 h 6 m 53 sec
Reputation Power: 0
I'm not sure i understand your question correctly but i think you mean you want to put the selected values in more than 1 cell and the property linkedcel can only contain 1 cell reference.

In that case i would just put the formula in d1 to "=c1" but i guess for some or other reason you don't wanna do that.

if you wanna put the selection to more than one cell in code you would do this as follows. Go to the visual basic editor by double-clicking the combobox in design mode. then put this code in the section for the combobox :

Private Sub ComboBox1_Change()
ActiveSheet.Range("c2").Value = ComboBox1.Value
ActiveSheet.Range("d2").Value = ComboBox1.Value
End Sub

if you click the button then (first turn of design mode again, it's that blue triangle form button) it should work.

Hope this solves your problem

Kind regards
Marc

Reply With Quote
Reply

Viewing: ASP Free ForumsProgrammingVisual Basic Programming > VBA question in Excel


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 2 hosted by Hostway
Stay green...Green IT