user form with Calendar - txt box not Cell

David0079

New Member
Joined
Jul 26, 2007
Messages
44
Hey all,

I've been scouring the internet trying to find a solution to this one and I keep hitting a wall. I have a userform and I would like people to be able to click on a txtbox and a calendar pop up. they select a date, hit ok and it populates the txt box with that date. I have made the calendar form and I am able to get it to appear but how do I get it to put the date back into the txtbox? There are multiple date txtboxes on the sheet and I need to populate each one individually as you click on them. All of the methods I have found so far are about populating a field in excel :( Any help anyone?Dave
 

Excel Facts

Excel Wisdom
Using a mouse in Excel is the work equivalent of wearing a lanyard when you first get to college
Dave

Are you using a control for the calendar?

If so which one?
 
Upvote 0
What do you mean when you say control? I'm using Excel and the information will back into a sheet.
 
Upvote 0
Dave

You say you've got a userform?

Well what controls are on it? eg textbox, calendar, datepicker etc
 
Upvote 0
Oh sorry m8, I have 8 text boxes at the moment, 4 on one side and four next to them on the other. People using the form will enter an event on the left and a date on the right but I would like a calendar to avoid people entering dates in wrong format etc. I have created the calendar in another form. At the moment I'm not sure wether how to activate the date form, can you open a form buy clicking in a text box and of course the problem of getting the date back into the textbox.

Dave
 
Upvote 0
Dave

I think you might be overcomplicating things by using another form for the calendar.

I understand your concern about checking the data entered, but that can easily be done using other methods. eg IsDate

And if the date is required in a particular format again that can be done.

Also there are actual controls available for entering dates/times, they are available when you goto Tools>Additional Controls...
 
Upvote 0
Dave

Glad to help.:)

One caveat though, the datepicker control isn't a 'standard' control.

So if what you are doing is going to be distributed then you may encounter problems if other users don't have access to it.:eek:
 
Upvote 0
Norie, If someone doesnt enter a date in the date picker it keeps todays date which is then entered onto the spreadsheet. Is there a way for this to display nothing unless a date is picked? Thanks
 
Upvote 0
Dave

I don't think you can really say that a user enters a date into the datepicker.

They choose a date, and if they don't choose one then it returns a default. eg today's date.

How exactly are you using the controls?
 
Upvote 0

Forum statistics

Threads
1,214,376
Messages
6,119,174
Members
448,870
Latest member
max_pedreira

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top