Selecting Multiple Dates Using Calendar Control
May 2, 2006how to multiple dates can be selected using the calendar control object? I haven't actually explored this for very long
View 5 Replieshow to multiple dates can be selected using the calendar control object? I haven't actually explored this for very long
View 5 RepliesI have created a calendar as part of main userform and I need to be able to select 2 dates and link them to 2 cells in the spreadsheet. According to your help on the calendar form at http://www.ozgrid.com/VBA/excel-calendar-dates.htm I managed to do the basic calendar but need to select in it 2 dates.
View 2 Replies View RelatedI have a spreadsheet that will always have the dates needed in cells H40 and H42. I would like the calendar to utilize the data validation in the cell to only allow someone to choose a date that is between the dates in H40 and H42.
Code:
Private Sub Calendar1_Click()
'ActiveSheet.Unprotect Password:="pbrmeasap"
ActiveCell.Value = CDbl(Calendar1.Value)
ActiveCell.NumberFormat = "mm/dd/yyyy"
ActiveCell.Select
Calendar1.Visible = False
[Code] ...
Could I add this code anywhere to make it work?
Code:
Sub DataValidation()
With Selection.Validation
.Delete
.Add Type:=xlValidateDate, AlertStyle:=xlValidAlertStop, Operator:= _
xlBetween, Formula1:="=$H$40", Formula2:="=$H$42"
[Code] ......
Is it possible to use one (1) calendar control to add different dates to different cells?
View 5 Replies View RelatedI have a user form that has a calendar button. Once clicked it updates a txtbox on my user form. What I would also like is for another txtbox (txtQtrLeave) to be auto populated based on this entry. Below is the code I've tried:
If CalendarEnd.Calendar1.Value > #3/31/2008# And CalendarEnd.Calendar1.Value < #1/6/2008# Then
Qtr = 1
frmAddClient.txtQtrLeave.Value = Qtr
... Qtr 2, 3 etc
It seems to return a value if I have one criteria but it doesn't work once I add the And element. What am I doing wrong (this has been driving me mad all morning)?
Have a slick way to have multiple textboxes on a userform updatable by a single calendar control located on it's own userform.
basically, i have a userform with multiple textboxes. A double click brings up another userform with a calendar control. How do you idenitfy which textbox called up the calendar?
I have a program where I can update the calibration due date of an item. I have attached a cut down version of my program showing the relevant areas. There is usually password protection on the worksheet so it can only be edited via the form (the vba coding removes the password protection before editing, then re-enables the password protection after editing). The "Update Calibration" button is usually on a "Menu" sheet.
Once the form is opened a serial number is typed in the textbox. The calendar button is then clicked, which brings up another form with the calendar on. The due date is selected on the calendar. When "OK" is clicked, the date label caption is then changed to the selected calendar date. When "Submit" is clicked, the spreadsheet will search for the Serial Number, once found, the label caption (being the date selected) will be entered into the cell to the right of the serial.
If the day selected on the calendar is greater than 12 the date is entered correctly onto the sheet. example: calendar date selected = 15/01/2010. shown on sheet as 15/01/2010. However, if the day selected on the calendar is 12 or less, the date is for some reason entered incorrectly onto the sheet. example: calendar date selected = 08/12/2010. shown on sheet as 12/08/2010???? What is going on here? how come the day and month are swapped around if the day is less than 12????
Using Excel 2007 Calendar Control:
I want to select a date of choice from a calendar in a field within an Excel spreadsheet.
I do not know how to do userforms and so that is why I wonder if I can add this in just a spreadsheet.
This is how far I have gotten so far: After doing the following, I have a static calendar setting in my spreadsheet like a text box showing the current date.
Developer
Insert
More Controls
Calendar Control 12.0
Attached is what I use as a Calendar Macro and it works great for single active cell use.
I have a column for 'Notes' and I can only use 1 cell per item so every time I have an update about a specific item I go the to notes section and put a date and leave few spaces then type in whatever the notes are. Currently I'm doing it manually and I tried to use my macro on the Notes column and what it does is to remove everything in the cell and replace it with whatever date I choose in the calendar.
find a way to use my current Calendar Macro to add a date in the cell instead replacing everything in the cell with a date.
I have a worksheet that has about 20 columns and 60 rows, but only need the data from 5 of the columns to link with outlook calendar. I want to be able to enter the date of completion of a task in the excel spreadsheet and have an reminder entered into outlook calendar a year later. I would like the Subject of the appointment to be the EMPLOYEE NAME and the Location of the appointment to be the TASK (what the employee has to renew) [these would be the column headers]. The duration can be ALL DAY for all appointments. A reminder would be fantastic!
The only other fear I have is each time I run the macro/VBA it will recreate duplicate appointments.
And I don't know if this is possible but one of the tasks (column) for renewal, ie: drug test, calls for an employee to be randomly selected every quarter. This will cause the employee to have a new annual renewal date in outlook but will outlook still retain the original annual renewal appointment date? I am sure we can live with this, but just a thought if there is a possibility of removing the original appointment it would be amazing.
I have attached example of worksheet. The yellow highlighted column headers contain the information I need renewal appointments created for.
If MonthView control can be set to allow users to select multiple ranges and enter different dates into those ranges? I know I was able to do with with the previous Datepicker control and I thought it was as easy as setting the Show Modal property to true.
View 1 Replies View RelatedI'm trying to make it so that when a user clicks on a certain cell, a calendar pops up so they can pick a date. This seems like a pretty common thing to want; I hope Microsoft puts it into the next release.
Anyway, I've read the tutorial found at [url]which tells you how to create a userform, add the calendar control to it, etc.
I've also modified it so that the calendar comes up when the user clicks on a certain cell, and so that the form closes when they choose a date.
I had to use the selection_changed subroutine to tell if someone clicked on the cell, but there are some flaws.
First, moving over to the cell with the keyboard arrows brings up the calendar (undesired result; I only want it to come up with clicking)
Second, if the cell is already selected, clicking it doesn't bring up the calendar since the selection didn't change (also undesired; I would like the form to come up whether the cell was previously selected or not).
I want to be able to show a calendar control, have the user select a date, and then fill a cell with that date. The range I would want the calendar to appear is B2:B100.
View 9 Replies View RelatedI got a file from someone that uses a Calendar Control in a user form, but my machine does not seem to have it installed, and Excel removes the control. I have Excel 2003 with SP2. I use the same version on my home machine but it does have Calendar Control, and the file works fine there. I tried copying the MSCC.* files from the OFFICE11 directory from home to this machine. Is there some straightforward way to install that control?
View 3 Replies View RelatedHas anyone out their ever seen an Calendar type of control totally built in an Excel vba UserForm?
My problem that I’ve tried to resolve for some time is utilizing some type of pop-up calendar to eliminate format issues in my published Excel forms. I have tried a number of calendar controls but all have to be registered on the local machine and this cannot be guarantied for every machine.
If someone could direct me to a vba UserForm that has this built in that might do the trick. Or is their another way to deal with this?
Over in the following thread
[url]
you can see we've hit a problem with the Calendar Control object.
I submitted a workbook which has an Activex calendar control embedded on a User Form. On my PC everything appears as you'd expect, with the calendar showing the individual days in the calendar matrix. However when the user loads the form on their system, although they see the calendar as you'd expect, and they can change the month & year at the top of the calendar, they don't see the individual day numbers, 1,2,3 etc. within the body of the calendar.
Having created a spreadsheet with active x calendar control I find that if the worksheet is password protected I'm unable to use the control to enter a date. Take the password off and it works fine. Is there a way around this??
The password for the attached example is "date"
I have the following code in my calendar initialize: ....
View 9 Replies View RelatedIs there a way to calculate a conditional minimum? I have a range of 1000+ values and I need to find the minimum, but the minimum has to be greater than a specified minimum threshold
View 2 Replies View RelatedI'm trying to use the Calendar Control 10.0 object in one of my worksheets. I basically want to be able to display a value by clicking on one of the dates in the calendar. Example: Say I want the contents of cell A1 to be displayed in B1 when somebody clicks on the 17th of February 2006. Is there any way to do this?
View 5 Replies View RelatedI am using calendar1 in my userform added from ms toolbox. When I open the file it shows dates of previous month when the calendar was added to the userform but not today date.
How can I set it to show as defaut day of today?
I would like to distribute a workbook that makes use of the calendar control in a userform.
Trouble is.... Not all the end users have the control installed or even a copy of the mscal.osc file.
This workbook is going to be rolled out to a large number of users with varying levels of computer literacy. For this reason I would like to try to 'attach' the calendar control to the workbook OR somehow distribute the mscal.osc fil and automate the installation.
User selects a date from a pop up calendar. The date and user ID is entered into the active cell of the active sheet. This I have. I would like at the same time to have it enter the value of just the date (without the user ID) to cell A1 on the sheet labeled final.
Also, while I'm on the topic, I have another workbook where I would like to do the exact same thing with the exception that the user will only be allowed to select a date equal to today or up to 60 days from today?
I would like to be able to calculate the number of Net Working Days between 2 dates using the dates returned from the calendar form and have the number of working days placed into a separate cell. Example, I use the popup calendar in A1 and select 10/1/06, I then use the popup calendar in B1 and select 10/9/06 and the number of Net Wroking Days is placed in cell C1. Is there a way to calculate the number of working days between the two chosen dates?
I have the forms for the calendar already created and am using this for the popup calendar but don't know where to start to calculate the working days from the calendars results.
Private Sub Worksheet_SelectionChange(ByVal Target As Range)
'This will launch when A1 and/or B1 is selected
If Target.Address = "$A$1" Or Target.Address = "$B$1" Then
CalendarFrm.Show
End If
End Sub
I'm looking for is a simple calendar that will be used, for example, to see if a certain date is available for vacation. The end user just needs to see the calendar. Open dates could be one color, and closed dates could be another. They will access this from a central location via a desktop shortcut as part of an overall toolkit.
I'm not entirely sure how to do this. Most of the calendar programs I've seen are dynamically generated, so there really wouldn't be a way to set certain values in it. It would need to be updated by me via an 'Administration' control panel (password protected, most likely)
I'm using MSCal.OCX to have a user select a date from a calendar in a user form. It all works fine on my machine and the machines of my colleagues. All of these are running XP Pro with Office Pro, Excel version 11.8120.8122. All have SP2 installed.
The problem comes when the customer tries to use it on their machine. They are running XP Pro with Office for Small Businesses, version 11.6560.6568.
I have done a search through Google and I have made sure he has the most up to date version of MSCal (11.0.6650.0) and registered it, using regsvr32 mscal.ocx. I've even made sure he has unregistered and deleted any previous versions. The error message he is getting reads: "Compile Error in Hidden Module: Module 4". This comes up when the calendar is supposed to appear. I have also tried getting the user to register the control in Control Toolbar -> More Controls -> Register Custom Controls but they still get the same error.
how I would display a simple msgbox to a user if a date they select from monthview isn't a date I want them to select. They can only chose dates between aug and dec 07 and i have the code lines
If MonthView1.Month = "12" And MonthView1.day = "15" Then december15.december15
Is there a way to prevent a user from clicking on the days in the Calendar Control 8.0? I am trying to place 12 calendar controls on a worksheet for reference only. I am using a linked cell to reflect what date the Calendar is to display.
View 2 Replies View RelatedI have a worksheet that has a Calendar on a worksheet from Calendar Control 8.0.
I want to be able to pick a month from the calendar and press a button to convert the selected month into a worksheet. I have a custom made calendar worksheet that I would like for it to be converted into.
I have uploaded my workbook. It contains the custom calendar worksheet as well as the calendar control.
The file is called "calendar.xls".
How do I limit the user from being able to choose only 1 year after they pick the first date on the first command button?
Here is the code on a userform which has a Calendar Control ...