Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox to select date


Hi,

I am new to this forum. I am new to excel VBA also. I am developing a
spreadsheet where i get inputs from the user using textboxes,comboboxes
and store it in another sheet.
Since the users can be from a different system we have different
versions of offixe (2002,2003). I want to develop a combobox to select
dates (calendar) in all the versions of office. I am not able to
proceed further and i have spent a couple of days trying to figure it.
Somebody please help me to get this coding done. Any code examples
would be good for me to get it started.

Thanks in advance


--
atlantis_sweet
------------------------------------------------------------------------
atlantis_sweet's Profile: http://www.excelforum.com/member.php...o&userid=33556
View this thread: http://www.excelforum.com/showthread...hreadid=533413

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Combobox to select date

Are you using forms in VBA with these text boxes,
comboboxes to gather your data?
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox to select date


Yes I am using textboxes and combobox to get data from the user.
I am not sure if it is the right way. I have almost 20 fields that
will get from the user and store it in a sheet when the user hits th
submit button.

Thank

--
atlantis_swee
-----------------------------------------------------------------------
atlantis_sweet's Profile: http://www.excelforum.com/member.php...fo&userid=3355
View this thread: http://www.excelforum.com/showthread.php?threadid=53341

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Combobox to select date


Yes I am using textboxes and combobox to get data from the user.
I am not sure if it is the right way. I have almost 20 fields that
will get from the user and store it in a sheet when the user hits th
submit button.

Thank

--
atlantis_swee
-----------------------------------------------------------------------
atlantis_sweet's Profile: http://www.excelforum.com/member.php...fo&userid=3355
View this thread: http://www.excelforum.com/showthread.php?threadid=53341

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Combobox to select date


If you press alt + f11 this will open VBA ( Visual Basics For Applications
).Now I'm not sure if you no much about this ( I'm still learning too) anyways
In the Menu bar goto Insert then Userform here you can build a form with
text boxes, comboboxes etc..

now at first there won't be a date or calendar,but when you insert a userform
another small window will open "Toolbox" here are your comboboxes and labels
etc.

Right click in a empty area of this toolbox and a window of available
controls will pop open.Scroll down until you see either Calendar Control or
Microsoft Date And Time Picker.Select one or both,then you will see these
controls in the toolbox.

Place the Date & Time Picker Control on your userform, aLso you need to put
a command button on your userform.Doubleclick the command button and paste
the following code into it.

Then press F5 to run the form (make sure the userform is selected when you
press F5)

hope this something like what you were looking for.


Here is some code for the Date and Time Picker form Microsoft
"atlantis_sweet" wrote:


Yes I am using textboxes and combobox to get data from the user.
I am not sure if it is the right way. I have almost 20 fields that i
will get from the user and store it in a sheet when the user hits the
submit button.

Thanks


--
atlantis_sweet
------------------------------------------------------------------------
atlantis_sweet's Profile: http://www.excelforum.com/member.php...o&userid=33556
View this thread: http://www.excelforum.com/showthread...hreadid=533413




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 26
Default Combobox to select date

Whoops forgot to paste in the code for you well here it is

Private Sub cmdOk_Click() ' Name your command this cmdOk or
' change to what ever you would like
Nextrow = Application.WorksheetFunction.CountA(Range("A:A")) + 1
'The above row of code determines the next empty row in column A
Cells(Nextrow, 1) = DTPicker1.Value 'This enters the value form your control
Cells(Nextrow, 1).NumberFormat = "[$-409]mmmm d, yyyy;@"
'This formats for the Date
Cells(Nextrow, 1).Columns.AutoFit ' This Line autofits the column to fit
the data

Unload Me

End Sub


"atlantis_sweet" wrote:


Yes I am using textboxes and combobox to get data from the user.
I am not sure if it is the right way. I have almost 20 fields that i
will get from the user and store it in a sheet when the user hits the
submit button.

Thanks


--
atlantis_sweet
------------------------------------------------------------------------
atlantis_sweet's Profile: http://www.excelforum.com/member.php...o&userid=33556
View this thread: http://www.excelforum.com/showthread...hreadid=533413


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
Using a combobox to select sheets T De Villiers[_10_] Excel Programming 1 January 22nd 06 08:17 PM
Select Text Files from Combobox D.Parker Excel Discussion (Misc queries) 4 June 28th 05 03:46 PM
Combobox that would select worksheets urpokarhu Excel Programming 1 June 1st 05 07:55 AM
Help Needed: ComboBox to select row and Cut xl 97 timh2ofall Excel Programming 2 May 15th 04 08:49 AM
ComboBox and select item Soniya Excel Programming 5 August 23rd 03 11:18 AM


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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"