Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 267
Default free text in combo box

I am using a combo box to enter data into an offset cell to the active cell.
I can type free text into the combo box but cannot get it to enter when I
click the box (which activates the sub to enter the data) into the offset
cell! I suspect this is because it doesnt count this as a click event?

My sub for entering text is as follows:

Private Sub ComboBox1_Click()

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

Dim Newvalue, d
With Worksheets("Main Board")

c = .Range("D82").Value
ActiveCell.Offset(c, 0).Value = ComboBox1.Value
ComboBox1.Value = ""

End With
ComboBox1.Visible = False

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True

End Sub

any Ideas anyone ??

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,934
Default free text in combo box

The Click event reacts to a click into the ComboBox's (also a ListBox's for
than matter) list of items... the Change event occurs whenever the text in
the edit field part of the ComboBox changes (whether typed in or as a result
of clicking into the list). See if putting your code in that Change event
gives you the result you are looking for.

--
Rick (MVP - Excel)


"Atishoo" wrote in message
...
I am using a combo box to enter data into an offset cell to the active
cell.
I can type free text into the combo box but cannot get it to enter when I
click the box (which activates the sub to enter the data) into the offset
cell! I suspect this is because it doesnt count this as a click event?

My sub for entering text is as follows:

Private Sub ComboBox1_Click()

Application.ScreenUpdating = False
Application.Calculation = xlCalculationManual

Dim Newvalue, d
With Worksheets("Main Board")

c = .Range("D82").Value
ActiveCell.Offset(c, 0).Value = ComboBox1.Value
ComboBox1.Value = ""

End With
ComboBox1.Visible = False

Application.Calculation = xlCalculationAutomatic
Application.ScreenUpdating = True

End Sub

any Ideas anyone ??


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
Find text in free-format text field Eric_NY Excel Discussion (Misc queries) 5 May 27th 09 07:31 PM
EARN,20000$ & ALL TYPES SOFTWARE FREE DOWNLOAD,& KATRINA KAIF OPENVIDEOS & WEBSITE DEV TO FREE ALL OVER THE WORLD`S PEOPLE SAI BABA Excel Worksheet Functions 0 January 25th 09 01:10 PM
Free social world wide network pays for 10 generations! Free! alabatros1 Excel Discussion (Misc queries) 0 November 15th 08 09:52 PM
Where free 2 sigma statistical process control chart, free? Blankenh Charts and Charting in Excel 0 January 16th 08 10:28 PM
free text box on a protected sheet John Davies Excel Programming 13 January 23rd 06 11:22 PM


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