Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I have never worked with calendar object yet, so here's my
question: Private Sub Workbook_Open() CommandButton1.Caption = "Import the list of matches from " & Calendar1.Value End Sub Run-time error '424': Object required. Why...? |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
i think u have not inserted calendar...
"Morris" wrote: Hi, I have never worked with calendar object yet, so here's my question: Private Sub Workbook_Open() CommandButton1.Caption = "Import the list of matches from " & Calendar1.Value End Sub Run-time error '424': Object required. Why...? |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Morris,
Try something like: '============= Private Sub Workbook_Open() Dim SH As Worksheet Dim myCB As OLEObject Dim myCal As OLEObject Set SH = Me.Sheets("Sheet2") '<<==== CHANGE Set myCB = SH.OLEObjects("CommandButton1") Set myCal = SH.OLEObjects("Calendar1") myCB.Object.Caption = "Import the list of matches from " _ & myCal.Object.Value End Sub '<<============= --- Regards, Norman "Morris" wrote in message ps.com... Hi, I have never worked with calendar object yet, so here's my question: Private Sub Workbook_Open() CommandButton1.Caption = "Import the list of matches from " & Calendar1.Value End Sub Run-time error '424': Object required. Why...? |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]() Norman Jones wrote: Hi Morris, Try something like: '============= Private Sub Workbook_Open() Dim SH As Worksheet Dim myCB As OLEObject Dim myCal As OLEObject Set SH = Me.Sheets("Sheet2") '<<==== CHANGE Set myCB = SH.OLEObjects("CommandButton1") Set myCal = SH.OLEObjects("Calendar1") myCB.Object.Caption = "Import the list of matches from " _ & myCal.Object.Value End Sub '<<============= --- Regards, Norman Thanks Norman, it is working now :) Muhameed: funny guess :) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Calendar Object in Excel | Excel Discussion (Misc queries) | |||
Object Calendar 11.0 | Excel Discussion (Misc queries) | |||
use of calendar object? | Excel Discussion (Misc queries) | |||
Running a CommandButton in Excel I get this error | Excel Programming | |||
Object Calendar 8.0 | Excel Programming |