Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Clear cell data using Combo Box

I have a combo box with 2 selections. How can I clear data or a formula from
A1 while inserting a formula into A2. Additionaly, using the second
selection, remove data or a formula from A2 while inserting a formula into A1.

Help/Advice/direction greatly appreciated.

Scott

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Clear cell data using Combo Box

I've got the following working, but is there a way to do this without the
"Range("Cell").Select ? Also, how can I format the font color?

Private Sub ComboBox4_Change()
If ComboBox4 = "Enter kVA" Then
Range("J43").Select
ActiveCell.FormulaR1C1 = "=R[-1]C/(SQRT(3)*RC[-7])"
Range("J42").Select
ActiveCell.FormulaR1C1 = "0"
Range("I43").Select
ActiveCell.FormulaR1C1 = "=R[-1]C/(SQRT(3)*RC[-6])"
Range("I42").Select
ActiveCell.FormulaR1C1 = "0"
Range("H43").Select
ActiveCell.FormulaR1C1 = "=R[-1]C/(SQRT(3)*RC[-5])"
Range("H42").Select
ActiveCell.FormulaR1C1 = "0"
Range("G43").Select
ActiveCell.FormulaR1C1 = "=R[-1]C/(SQRT(3)*RC[-4])"
Range("G42").Select
ActiveCell.FormulaR1C1 = "0"
Else
Range("J42").Select
ActiveCell.FormulaR1C1 = "=SQRT(3)*R[1]C[-7]*R[1]C"
Range("J43").Select
ActiveCell.FormulaR1C1 = "0"
Range("I42").Select
ActiveCell.FormulaR1C1 = "=SQRT(3)*R[1]C[-6]*R[1]C"
Range("I43").Select
ActiveCell.FormulaR1C1 = "0"
Range("H42").Select
ActiveCell.FormulaR1C1 = "=SQRT(3)*R[1]C[-5]*R[1]C"
Range("H43").Select
ActiveCell.FormulaR1C1 = "0"
Range("G42").Select
ActiveCell.FormulaR1C1 = "=SQRT(3)*R[1]C[-4]*R[1]C"
Range("G43").Select
ActiveCell.FormulaR1C1 = "0"
End If
End Sub
Private Sub Worksheet_Activate()
With Me.ComboBox4
.ListFillRange = "M30: M31"
.ListIndex = 0
End With
End Sub

"Scott King" wrote:

I have a combo box with 2 selections. How can I clear data or a formula from
A1 while inserting a formula into A2. Additionaly, using the second
selection, remove data or a formula from A2 while inserting a formula into A1.

Help/Advice/direction greatly appreciated.

Scott

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
Clear a set of combo boxes after a Submit of data to a new sheet. Jonah Excel Worksheet Functions 0 March 3rd 08 12:05 AM
Clear entries on Combo box casey Excel Discussion (Misc queries) 1 December 13th 06 02:37 AM
Clear unactive combo boxes [email protected] Excel Programming 2 September 23rd 05 08:09 PM
Macro to clear combo box values Carpie Excel Programming 4 September 9th 05 06:48 PM
How to clear all item from a combo box? 39N95W Excel Programming 8 July 19th 04 07:31 AM


All times are GMT +1. The time now is 07:06 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"