Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
beb beb is offline
external usenet poster
 
Posts: 6
Default How can i combine combo boxes


Hi,

I have three combo boxes in VB user form for date (day,month,year), and
i need to combine these in an excel cell, but i cannot. Can anyone give
me a code? please...


*** Sent via Developersdex http://www.developersdex.com ***
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How can i combine combo boxes

Hi Bep,

Assume the three comboboxes are named cbxDay, cbxMonth and cbxYear, then,
for example, the requied date might be inserted using a commandbutton, thus:

'=====================
Private Sub CommandButton1_Click()
Sheets("Sheet2").Range("A1").Value = _
DateSerial(cbxYear, cbxMonth, cbxDay)
End Sub
'<<=====================

---
Regards,
Norman


"beb" wrote in message
...

Hi,

I have three combo boxes in VB user form for date (day,month,year), and
i need to combine these in an excel cell, but i cannot. Can anyone give
me a code? please...


*** Sent via Developersdex http://www.developersdex.com ***



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default How can i combine combo boxes

Hi Beb,

Or, more explicitly:

'=====================
Private Sub CommandButton1_Click()
Sheets("Sheet2").Range("A1").Value = _
DateSerial(cbxYear.Value, cbxMonth.Value, cbxDay.Value)
End Sub
'<<=====================

---
Regards,
Norman



"Norman Jones" wrote in message
...
Hi Bep,

Assume the three comboboxes are named cbxDay, cbxMonth and cbxYear, then,
for example, the requied date might be inserted using a commandbutton,
thus:

'=====================
Private Sub CommandButton1_Click()
Sheets("Sheet2").Range("A1").Value = _
DateSerial(cbxYear, cbxMonth, cbxDay)
End Sub
'<<=====================

---
Regards,
Norman


"beb" wrote in message
...

Hi,

I have three combo boxes in VB user form for date (day,month,year), and
i need to combine these in an excel cell, but i cannot. Can anyone give
me a code? please...


*** Sent via Developersdex http://www.developersdex.com ***





  #4   Report Post  
Posted to microsoft.public.excel.programming
beb beb is offline
external usenet poster
 
Posts: 6
Default How can i combine combo boxes


thanx Norman, it works:)


*** Sent via Developersdex http://www.developersdex.com ***
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
Getting Combo boxes to change options based on other Combo boxes. Ancient Wolf New Users to Excel 1 March 27th 09 06:29 PM
Selecting subsets using combo boxes or list boxes CLamar Excel Discussion (Misc queries) 0 June 1st 06 07:43 PM
Questions on combo boxes and list boxes. Marc New Users to Excel 1 March 14th 06 09:40 AM
Combo Boxes and Tick Boxes turner2000[_2_] Excel Programming 0 September 29th 04 09:09 PM
Combo Boxes and Tick Boxes turner2000 Excel Programming 0 September 28th 04 10:01 PM


All times are GMT +1. The time now is 10:35 PM.

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"