Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default ms project popup calendar in excel?

is there anyway to envoke the handy calendar popup that is available as a drop
down in ms project date fields into excel for a similar purpose? thanks!




  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default ms project popup calendar in excel?

Baboo

On the Control Toolbox, there is a Calendar Control that you can use to get
almost the same thing. You can put it on the sheet, then use code like this
in the sheet's module to make it "popup"

Private Sub Calendar1_Click()

ActiveCell.Value = Me.Calendar1.Value

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'To limit to column C
If Target.Column = 3 Then
Me.Calendar1.Visible = True
Me.Calendar1.Top = Target.Top + Target.Height
Me.Calendar1.Left = Target.Left
Else
Me.Calendar1.Visible = False
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Baboo" wrote in message
...
is there anyway to envoke the handy calendar popup that is available as a

drop
down in ms project date fields into excel for a similar purpose? thanks!






  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ms project popup calendar in excel?

Dick,
Thanks for this. It workes exactly as I need.
But as a beginning coder, I don't understand what the "Me." in
"ActiveCell.Value = Me.Calendar1.Value" is doing.
I tried changing it to something else and get an error message.
I get how the other code is working , but the 'Me.' prefix has me puzzled.
Thanks.
Alan


"Dick Kusleika" wrote in message ...
Baboo

On the Control Toolbox, there is a Calendar Control that you can use to get
almost the same thing. You can put it on the sheet, then use code like this
in the sheet's module to make it "popup"

Private Sub Calendar1_Click()

ActiveCell.Value = Me.Calendar1.Value

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'To limit to column C
If Target.Column = 3 Then
Me.Calendar1.Visible = True
Me.Calendar1.Top = Target.Top + Target.Height
Me.Calendar1.Left = Target.Left
Else
Me.Calendar1.Visible = False
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Baboo" wrote in message
...
is there anyway to envoke the handy calendar popup that is available as a

drop
down in ms project date fields into excel for a similar purpose? thanks!




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default ms project popup calendar in excel?

Alan

The sheet's module is really a class module, but it's a special class module
because it has the sheet's events built in. It also has events for any
controls on the sheet built in. When you're in a class module, the Me
keyword refers to the class, in this case the sheet. You could just as
easily have

ActiveCell.Value = Sheets("Sheet1").Calendar1.Value

but if you ever changed the sheet name, this line wouldn't work. Me gives
you a way to reference the sheet regardless if you change the name or the
position of the sheet.

In a userform's class module, Me refers to the userform. In the
ThisWorkbook class module, Me refers to the workbook.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Alan" wrote in message
om...
Dick,
Thanks for this. It workes exactly as I need.
But as a beginning coder, I don't understand what the "Me." in
"ActiveCell.Value = Me.Calendar1.Value" is doing.
I tried changing it to something else and get an error message.
I get how the other code is working , but the 'Me.' prefix has me puzzled.
Thanks.
Alan


"Dick Kusleika" wrote in message

...
Baboo

On the Control Toolbox, there is a Calendar Control that you can use to

get
almost the same thing. You can put it on the sheet, then use code like

this
in the sheet's module to make it "popup"

Private Sub Calendar1_Click()

ActiveCell.Value = Me.Calendar1.Value

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target As Range)

'To limit to column C
If Target.Column = 3 Then
Me.Calendar1.Visible = True
Me.Calendar1.Top = Target.Top + Target.Height
Me.Calendar1.Left = Target.Left
Else
Me.Calendar1.Visible = False
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Baboo" wrote in message
...
is there anyway to envoke the handy calendar popup that is available

as a
drop
down in ms project date fields into excel for a similar purpose?

thanks!






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ms project popup calendar in excel?

Thanks for the clear explanation. I replicated the sheet 3 times in
the workbook, and the control works on every sheet! I now understand
that by using 'Me' as the reference, I was able to get that to work
easily.
But. . . Why oh why doesn't the VBA help show me 'ME' when I go to the
'index' tab and the first entry field says: 'type keywords'?-
Before asking you my question, I tried that , and 'me' is not
referenced.
Now that you told me that 'me' is a keyword, I went back to help,
looked 'me' in the keyword section under 'CONTENTS', and there it is
with an explanation.
Go figure.
Alan

"Dick Kusleika" wrote in message ...
Alan

The sheet's module is really a class module, but it's a special class module
because it has the sheet's events built in. It also has events for any
controls on the sheet built in. When you're in a class module, the Me
keyword refers to the class, in this case the sheet. You could just as
easily have

ActiveCell.Value = Sheets("Sheet1").Calendar1.Value

but if you ever changed the sheet name, this line wouldn't work. Me gives
you a way to reference the sheet regardless if you change the name or the
position of the sheet.

In a userform's class module, Me refers to the userform. In the
ThisWorkbook class module, Me refers to the workbook.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Alan" wrote in message
om...
Dick,
Thanks for this. It workes exactly as I need.
But as a beginning coder, I don't understand what the "Me." in
"ActiveCell.Value = Me.Calendar1.Value" is doing.
I tried changing it to something else and get an error message.
I get how the other code is working , but the 'Me.' prefix has me puzzled.
Thanks.
Alan




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default ms project popup calendar in excel?

Dick,

Could you provide the code to restrict it to a cell?

Thanks!!
Quentin

-----Original Message-----
Alan

The sheet's module is really a class module, but it's a

special class module
because it has the sheet's events built in. It also has

events for any
controls on the sheet built in. When you're in a class

module, the Me
keyword refers to the class, in this case the sheet.

You could just as
easily have

ActiveCell.Value = Sheets("Sheet1").Calendar1.Value

but if you ever changed the sheet name, this line

wouldn't work. Me gives
you a way to reference the sheet regardless if you

change the name or the
position of the sheet.

In a userform's class module, Me refers to the

userform. In the
ThisWorkbook class module, Me refers to the workbook.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Alan" wrote in message
. com...
Dick,
Thanks for this. It workes exactly as I need.
But as a beginning coder, I don't understand what

the "Me." in
"ActiveCell.Value = Me.Calendar1.Value" is doing.
I tried changing it to something else and get an error

message.
I get how the other code is working , but the 'Me.'

prefix has me puzzled.
Thanks.
Alan


"Dick Kusleika"

wrote in message
...
Baboo

On the Control Toolbox, there is a Calendar Control

that you can use to
get
almost the same thing. You can put it on the sheet,

then use code like
this
in the sheet's module to make it "popup"

Private Sub Calendar1_Click()

ActiveCell.Value = Me.Calendar1.Value

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target

As Range)

'To limit to column C
If Target.Column = 3 Then
Me.Calendar1.Visible = True
Me.Calendar1.Top = Target.Top + Target.Height
Me.Calendar1.Left = Target.Left
Else
Me.Calendar1.Visible = False
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Baboo" wrote in message
...
is there anyway to envoke the handy calendar popup

that is available
as a
drop
down in ms project date fields into excel for a

similar purpose?
thanks!






.

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default ms project popup calendar in excel?

Quentin

Instead of using

If Target.Column = 3 Then

use

If Target.Address = "$A$10" Then

That way it will only work on A10 and no other cells. Obviously change
$A$10 to whichever cell you want.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.


"Quentin" wrote in message
...
Dick,

Could you provide the code to restrict it to a cell?

Thanks!!
Quentin

-----Original Message-----
Alan

The sheet's module is really a class module, but it's a

special class module
because it has the sheet's events built in. It also has

events for any
controls on the sheet built in. When you're in a class

module, the Me
keyword refers to the class, in this case the sheet.

You could just as
easily have

ActiveCell.Value = Sheets("Sheet1").Calendar1.Value

but if you ever changed the sheet name, this line

wouldn't work. Me gives
you a way to reference the sheet regardless if you

change the name or the
position of the sheet.

In a userform's class module, Me refers to the

userform. In the
ThisWorkbook class module, Me refers to the workbook.

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Alan" wrote in message
. com...
Dick,
Thanks for this. It workes exactly as I need.
But as a beginning coder, I don't understand what

the "Me." in
"ActiveCell.Value = Me.Calendar1.Value" is doing.
I tried changing it to something else and get an error

message.
I get how the other code is working , but the 'Me.'

prefix has me puzzled.
Thanks.
Alan


"Dick Kusleika"

wrote in message
...
Baboo

On the Control Toolbox, there is a Calendar Control

that you can use to
get
almost the same thing. You can put it on the sheet,

then use code like
this
in the sheet's module to make it "popup"

Private Sub Calendar1_Click()

ActiveCell.Value = Me.Calendar1.Value

End Sub

Private Sub Worksheet_SelectionChange(ByVal Target

As Range)

'To limit to column C
If Target.Column = 3 Then
Me.Calendar1.Visible = True
Me.Calendar1.Top = Target.Top + Target.Height
Me.Calendar1.Left = Target.Left
Else
Me.Calendar1.Visible = False
End If

End Sub

--
Dick Kusleika
MVP - Excel
www.dicks-clicks.com
Post all replies to the newsgroup.

"Baboo" wrote in message
...
is there anyway to envoke the handy calendar popup

that is available
as a
drop
down in ms project date fields into excel for a

similar purpose?
thanks!






.



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
hiding the popup control calendar after clicking a merged cell?? Anders Excel Worksheet Functions 2 July 6th 09 02:00 PM
Can't get the popup calendar to work when I protect the workbook Patty Excel Discussion (Misc queries) 6 October 28th 08 05:01 PM
Popup calendar GerryK Excel Discussion (Misc queries) 1 April 4th 07 07:14 PM
calendar popup Aaron Excel Discussion (Misc queries) 1 May 11th 06 02:52 PM
popup calendar with multiple months shawn Excel Discussion (Misc queries) 0 December 28th 05 02:55 AM


All times are GMT +1. The time now is 02:13 AM.

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"