Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default Pop Up Excel Calendar VBA CODE

I had a problem with my users, they are scattered all over the place.
And I was creating some really good applications with excel.

But when I started programming using the Activex Calendar control
problems started occurring.

Sure it worked fine on my system but on others it did not.
Sometimes I could talk them into how to get it to work.
But then were times when they were on networks that did
not allow installing the control.

So I came up with the idea of making A VBA pop up calendar that
could be used universally. Because I got a lot of help from this group.
So I am releasing the code for all of you to use.

This should work with Excel 97 and above. There is not much to
the documentation at all. So if you need help with using it just ask.

Basically you can call it from a form button on your excel sheet
or you can even call it up from a selection sheet change.

If the date in the active cell is blank the calendar will pop up
with the current system date.

If there is a date in the active cell then the calendar will pop up
with the month and year of that cell.

If the data in the active cell is not a date then the calendar pops
up with the current system date.

Here is the link to the file.

http://www.mediafire.com/?29hymh2m3ew

BTW I am not an MVP or was I formerly trained using Excel.
I just learned it on my own. And I do not profess to be an expert
In any way.

Enjoy
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Pop Up Excel Calendar VBA CODE

Hi Pete,

Looks good. On my system the combo - box LB_Mth only populates 12 Januarys.
i.e not january to December.

Mike

Mike.


"Pete" wrote:

I had a problem with my users, they are scattered all over the place.
And I was creating some really good applications with excel.

But when I started programming using the Activex Calendar control
problems started occurring.

Sure it worked fine on my system but on others it did not.
Sometimes I could talk them into how to get it to work.
But then were times when they were on networks that did
not allow installing the control.

So I came up with the idea of making A VBA pop up calendar that
could be used universally. Because I got a lot of help from this group.
So I am releasing the code for all of you to use.

This should work with Excel 97 and above. There is not much to
the documentation at all. So if you need help with using it just ask.

Basically you can call it from a form button on your excel sheet
or you can even call it up from a selection sheet change.

If the date in the active cell is blank the calendar will pop up
with the current system date.

If there is a date in the active cell then the calendar will pop up
with the month and year of that cell.

If the data in the active cell is not a date then the calendar pops
up with the current system date.

Here is the link to the file.

http://www.mediafire.com/?29hymh2m3ew

BTW I am not an MVP or was I formerly trained using Excel.
I just learned it on my own. And I do not profess to be an expert
In any way.

Enjoy

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Pop Up Excel Calendar VBA CODE

Pete,

It's this loop which evaluates to 1st to 12th jan for each of the passes so
with the format set each of those dates evaluates as january.

For I = 1 To 12
LB_Mth.AddItem Format((I) & "/1/" & (ThisYear), "mmmm")
z = Format((I) & "/1/" & (ThisYear), "ddmmyyyy")
Stop
Next

Mike

"Pete" wrote:

I had a problem with my users, they are scattered all over the place.
And I was creating some really good applications with excel.

But when I started programming using the Activex Calendar control
problems started occurring.

Sure it worked fine on my system but on others it did not.
Sometimes I could talk them into how to get it to work.
But then were times when they were on networks that did
not allow installing the control.

So I came up with the idea of making A VBA pop up calendar that
could be used universally. Because I got a lot of help from this group.
So I am releasing the code for all of you to use.

This should work with Excel 97 and above. There is not much to
the documentation at all. So if you need help with using it just ask.

Basically you can call it from a form button on your excel sheet
or you can even call it up from a selection sheet change.

If the date in the active cell is blank the calendar will pop up
with the current system date.

If there is a date in the active cell then the calendar will pop up
with the month and year of that cell.

If the data in the active cell is not a date then the calendar pops
up with the current system date.

Here is the link to the file.

http://www.mediafire.com/?29hymh2m3ew

BTW I am not an MVP or was I formerly trained using Excel.
I just learned it on my own. And I do not profess to be an expert
In any way.

Enjoy

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,501
Default Pop Up Excel Calendar VBA CODE

Pete,

Corrected line for UK date format but probably messes up systems formatted US.

Mike

For I = 1 To 12
LB_Mth.AddItem Format("1/" & (I) & "/" & (ThisYear), "mmmm")
Next

"Pete" wrote:

I had a problem with my users, they are scattered all over the place.
And I was creating some really good applications with excel.

But when I started programming using the Activex Calendar control
problems started occurring.

Sure it worked fine on my system but on others it did not.
Sometimes I could talk them into how to get it to work.
But then were times when they were on networks that did
not allow installing the control.

So I came up with the idea of making A VBA pop up calendar that
could be used universally. Because I got a lot of help from this group.
So I am releasing the code for all of you to use.

This should work with Excel 97 and above. There is not much to
the documentation at all. So if you need help with using it just ask.

Basically you can call it from a form button on your excel sheet
or you can even call it up from a selection sheet change.

If the date in the active cell is blank the calendar will pop up
with the current system date.

If there is a date in the active cell then the calendar will pop up
with the month and year of that cell.

If the data in the active cell is not a date then the calendar pops
up with the current system date.

Here is the link to the file.

http://www.mediafire.com/?29hymh2m3ew

BTW I am not an MVP or was I formerly trained using Excel.
I just learned it on my own. And I do not profess to be an expert
In any way.

Enjoy

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,202
Default Pop Up Excel Calendar VBA CODE

It's this loop which evaluates to 1st to 12th jan for each of the passes
so
with the format set each of those dates evaluates as january.

For I = 1 To 12
LB_Mth.AddItem Format((I) & "/1/" & (ThisYear), "mmmm")
z = Format((I) & "/1/" & (ThisYear), "ddmmyyyy")
Stop
Next


Ah! Aren't international issues wonderful? Using these Format statements
instead of the above ones should make the code work correctly for all
regional settings...

Format(DateSerial(ThisYear,I,1), "mmmm")

Format(DateSerial(ThisYear,I,1), "ddmmyyyy")

Rick



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 163
Default Pop Up Excel Calendar VBA CODE

Hi Pete,

excellent. A tool to remember.

BTW I am not an MVP or was I formerly trained using Excel.
I just learned it on my own.
And I do not profess to be an expert In any way.


I bet, most of us did it without training,
schooling, courses, whatsoever.

If you are smart, you can make it.
Which doesn't make life any easier, regrettably.


--
Greetings from Bavaria, Germany

Helmut Weber, MVP WordVBA

Win XP, Office 2003
"red.sys" & Chr$(64) & "t-online.de"
  #7   Report Post  
Posted to microsoft.public.excel.programming
G56 G56 is offline
external usenet poster
 
Posts: 2
Default Pop Up Excel Calendar VBA CODE

"Rick Rothstein \(MVP - VB\)" wrote
in :

It's this loop which evaluates to 1st to 12th jan for each of the
passes so
with the format set each of those dates evaluates as january.

For I = 1 To 12
LB_Mth.AddItem Format((I) & "/1/" & (ThisYear), "mmmm")
z = Format((I) & "/1/" & (ThisYear), "ddmmyyyy")
Stop
Next


Ah! Aren't international issues wonderful? Using these Format
statements instead of the above ones should make the code work
correctly for all regional settings...

Format(DateSerial(ThisYear,I,1), "mmmm")

Format(DateSerial(ThisYear,I,1), "ddmmyyyy")

Rick


Thanks Rick, Forgot that someone from another country might use it.
  #8   Report Post  
Posted to microsoft.public.excel.programming
G56 G56 is offline
external usenet poster
 
Posts: 2
Default Pop Up Excel Calendar VBA CODE

?B?TWlrZSBI?= wrote in
:

Pete,

Corrected line for UK date format but probably messes up systems
formatted US.

Mike

For I = 1 To 12
LB_Mth.AddItem Format("1/" & (I) & "/" & (ThisYear), "mmmm")

Next

"Pete" wrote:

I had a problem with my users, they are scattered all over the place.
And I was creating some really good applications with excel.

But when I started programming using the Activex Calendar control
problems started occurring.

Sure it worked fine on my system but on others it did not.
Sometimes I could talk them into how to get it to work.
But then were times when they were on networks that did
not allow installing the control.

So I came up with the idea of making A VBA pop up calendar that
could be used universally. Because I got a lot of help from this
group. So I am releasing the code for all of you to use.

This should work with Excel 97 and above. There is not much to
the documentation at all. So if you need help with using it just ask.

Basically you can call it from a form button on your excel sheet
or you can even call it up from a selection sheet change.

If the date in the active cell is blank the calendar will pop up
with the current system date.

If there is a date in the active cell then the calendar will pop up
with the month and year of that cell.

If the data in the active cell is not a date then the calendar pops
up with the current system date.

Here is the link to the file.

http://www.mediafire.com/?29hymh2m3ew

BTW I am not an MVP or was I formerly trained using Excel.
I just learned it on my own. And I do not profess to be an expert
In any way.

Enjoy


Mike, did you see Rick's post?

Change the format to the following

Format(DateSerial(ThisYear,I,1), "ddmmyyyy")

That makes it work with your country and mine.

When you first pointed it out I could not figure out
what you were talking about. Then rick pointed out
the above.

So I changed wmy system settings to UK and saw
for my self what you were talking about.

Pete
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
how do i export excel calendar info to outlook calendar? Maggie Excel Discussion (Misc queries) 1 December 31st 07 10:27 PM
Calendar code not working RobN[_3_] Excel Discussion (Misc queries) 9 May 17th 07 04:48 AM
excel calendar - list of names displayed on calendar Brian'88 Excel Worksheet Functions 3 November 17th 06 10:31 PM
Modify Yearly Calendar to Monthly Calendar Excel 2000? James Cooper Excel Programming 13 July 13th 06 11:46 PM
import calendar items from excel into outlook calendar jsewaiseh Excel Discussion (Misc queries) 0 September 2nd 05 03:53 PM


All times are GMT +1. The time now is 06:20 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"