Calendar Control, Mscal.ocx Compile Error

Mar 22, 2007

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.

View 2 Replies


ADVERTISEMENT

Compile Error / Invalid Next Control Variable Reference

Jul 16, 2013

I have written the following VBA Script but am getting an error message saying -> "Compile Error. Invalid Next control variable reference".

Code:

Sub Form1() 'Change Yes/No
Dim bottomT1 As Integer
bottomT1 = Sheets("Data Sheet").Range("T" & Rows.Count).End(xlUp).Row
Dim bottomP2 As Integer
bottomP2 = Sheets("Follow-Up").Range("P" & Rows.Count).End(xlUp).Row
Dim bottomO2 As Integer
bottomO2 = Sheets("Follow-Up").Range("O" & Rows.Count).End(xlUp).Row

[code].....

View 5 Replies View Related

Calendar Control 11: Selected On The Calendar Is Greater Than 12 The Date Is Entered Correctly Onto The Sheet

Jan 8, 2010

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????

View 4 Replies View Related

Excel 2007 Calendar Control - Select Date From Calendar In A Field

Dec 24, 2009

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

View 9 Replies View Related

Error Message Regarding "Calendar Control".

Aug 30, 2007

I am currently using Excel 2003 SP2 (Standard Edition)

The company where I work has created several userforms which use the Calendar function within VB and all employees can use this.

I have since created a new set of Userforms (which do not use the calendar function) for an external company. Upon opening the spreadsheet and running the code to launch the Userform they get an error message regarding "Calendar Control".

View 9 Replies View Related

Copy And Paste Special Values But Getting Error 'Compile Error - Expected Function Or Variable'

Feb 7, 2007

I am trying to run create a simple macro that copies and paste special values - something I have done 100's of times but for some reason I keep getting an error message - even though I recorded the macro and didnt write it by hand - see below:

Sub Macro6()
Cells.Select
selection.Copy
selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
End Sub

For which I get 'Compile Error - Expected Function or Variable'

View 6 Replies View Related

Vba Macro Error: Compile Error Named Argument Not Found

Apr 26, 2006

I have some code that, although works fine in Excel 2003, does not in Excel 1997. I receive this error when I try running it:

COMPILE ERROR:
NAMED ARGUMENT NOT FOUND

Sub HPVAL()
Dim r As Range, myStr As String
myStr = "HP"
Set r = Cells. Find(What:=myStr, After:=ActiveCell, LookIn:=xlFormulas, LookAt _
:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _
False, SearchFormat:=False)
If Not r Is Nothing Then
r = r.Value
While Not r Is Nothing
Set r = Cells.FindNext(r)
If Not r Is Nothing Then
r = r.Value
End If
Wend
End If
End Sub

It looks like Excel is getting hung up on the "SearchFormat:=" portion of the code.

View 2 Replies View Related

Better Calendar Control

May 20, 2009

I'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).

View 12 Replies View Related

Error Message (Compile Error, Procedure Too Large)

May 20, 2009

I am looking for a more efficient way to write a macro (a sample from the macro is below). This is just the first part of the macro. I need to repeat these same steps (seen for row 5 below) for rows 5 to 50. My script worked until I hit row 35 and then I got the "compile error.." message. There must be a way to use "loop" to write this more efficiently, no?

View 14 Replies View Related

Calendar Control On Click

Apr 21, 2008

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 Related

Calendar Control Not Installed!

Dec 8, 2006

I 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 Related

VBA Calendar Control Without Control

Mar 12, 2003

Has 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?

View 9 Replies View Related

Compile Error Syntax Error In Macro

May 17, 2014

VB:
Selection.FormulaArray = _
"=IF(RC[-7]=""Weekly"",RC[-1],IF((ParentCode=RC[-10])*(ClassType=""Active""),IF((EndDate=EOMONTH(EndDate,0))*(RC[-7]
={""Monthly"",""Quarterly""}),RC[-1],0),IF(RC[-7]=""Daily"",IF(SUMPRODUCT(((ParentCode=RC[-10])*(FundType=""C"")*
(ClassType=""Inactive Class"")*(TermDate<>"""")*(TermDate>=StartDate)*(TermDate<=EndDate))+((ParentCode=RC[-10])*

[Code] .....

I recorded macro for this formula its giving me syntax error i did " _" after the break but its still not working..

View 4 Replies View Related

Macro: Compile Error - Syntax Error

Feb 1, 2010

"Compile error - Syntax Error"

and the following line highlighted in yellow

"Sub CreateWorkbooks()"

It worked on Excel 2000 but not now and dont work either in Excel 2007.

Heres the complete code .....

View 9 Replies View Related

VBA Calendar Control Does Not Show Day Numbers

Jul 23, 2008

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.

View 9 Replies View Related

Active X Calendar Control And Password

May 21, 2009

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"

View 4 Replies View Related

Limiting Calendar Control Dates

Jan 3, 2012

I 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] ......

View 4 Replies View Related

Calendar Control Vba Not To Go Past One Year

Mar 22, 2007

I have the following code in my calendar initialize: ....

View 9 Replies View Related

Go To Date Chosen From Calendar Control

Aug 18, 2009

Is 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 Related

USE Calendar Control 10.0 Object In Worksheets

Jul 19, 2006

I'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 Related

Set Default Value Of Calendar Control To Today

Sep 4, 2006

I 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?

View 5 Replies View Related

Use One (1) Calendar Control To Add Different Dates To Different Cells

Oct 8, 2006

Is it possible to use one (1) calendar control to add different dates to different cells?

View 5 Replies View Related

Distribute Workbook With Calendar Control

May 16, 2008

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.

View 4 Replies View Related

Selecting Multiple Dates Using Calendar Control

May 2, 2006

how to multiple dates can be selected using the calendar control object? I haven't actually explored this for very long

View 5 Replies View Related

Enter Different Value To Seperate Cells From Calendar Control

Aug 4, 2006

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?

View 7 Replies View Related

Calendar Form/Control To Calculate NetWorkDays

Sep 29, 2006

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

View 3 Replies View Related

Updatable Calendar Via An 'Administration' Control Panel

Oct 8, 2006

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)

View 2 Replies View Related

Single Calendar Control To Multiple Textboxes

Jun 11, 2007

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?

View 9 Replies View Related

Determine Month & Day Chosen From Calendar Control

Sep 5, 2007

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

View 4 Replies View Related

Determine If Calendar Control Date Is Between 2 Dates

Apr 15, 2008

I 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)?

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved