• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Userform calendar

ranaray

Member
Hi Gurus,


I am working on an excel form, I have a need to add a calendar picklist in the form.


I have created a userform and added a calendar. I then went back to my spreadsheet created a button and assigned a macro to it. The macro shows the userform with the calendar.


My issue is when an user selects a data how do I get the date to populate in a specific cell say A1.


Many thanks

Rana
 
Hi Rana ,


A similar question was posed earlier here :


http://chandoo.org/forums/topic/need-guidance-to-write-a-code-to-take-date-from-useform3calender1


Does it help ?


Narayan
 
Hello,


This would have been perfect but looks like somebody has deleted the sample file. I dont know how to get to the calendar module to put in your codes.


Please help.

Rana
 
Hi Rana ,


You can download the file here :


http://speedy.sh/Cwp6b/Data-Entry.xlsm


Click on the Update button to bring up the userform.


Narayan
 
Hi Narayan,


Thank you ever so much for your help but I think I have a different requirment. Sorry for being thick but really appreciate your inputs and the time you invest to answer queries.


https://docs.google.com/open?id=0B_upMYdtf67RN05nX3VRS29ISVE&invite=CMj5x94D


Let me know if you have any queries.


Thanks

Rana
 
Hi Rana ,


Sorry , but it's late at night here ! I'll reply tomorrow morning ; hope someone else can look at your file in the meantime.


Narayan
 
Hi Narayan,


You are a magician :) The next time I come to India if I am anywhere close I would love to meet you and thank you personally :)


What I want to understand is how did you do this? I can see the macro code but dont know what have you done behind userform1 to make it populate the date in that specific cell?


Thanks

Rana
 
Hi Rana ,


Thanks but I am no magician ! Click on Forms in the VBE , click on UserForm1 , and you can see the code.


Narayan
 
Hi Narayan,


Sorry to be a pain, below is the documnet that I am trying to get the calendar working but dont know what I have not done to make it work like yours.


Sorry for being dumb.


https://docs.google.com/open?id=0B_upMYdtf67RZEptemN4dkhFc0E


Thanks

Rana
 
@ranaray


Hi


the difference between the Narayank and you that is you need to change the Name of UserForm


because the specific code is linked with the user form the userform name is Calendar


just right click the userform and go to proprties there you will find some list in that list you need to change the name to Calendar


and now look it's working


hope you understand


Thanks


SP
 
Hi SP,


Sorry but this is not working.


https://docs.google.com/open?id=0B_upMYdtf67RYWc0VzRRN1pkZ0E


I changed the button name to 'Calendar' and when I right click on the userform1 and click on VBAproperties - it gives me 2 options (Genral and protection) no names were enterend by Narayan there.


I am sure I am doing something stupid. Please help. I am on excel 2010.


Rana
 
@ranaray


Hi


i think you can't understand properly what i told you


just follow the instruction as given below


1. Open the VBA Properties


2. Double click on the UserForm


3. Now you can able to see the Calendar


4. In that calendar UserForm click the Right click and select the Properties other wise juse press the Short cut key F4


5. Now you will see the Properties of Calendar there you have to change the name as Calendar


Hope you under stand


Other wise download the your own file


https://dl.dropbox.com/u/75654703/Book1.xlsm1


Thanks


SP
 
Hi Rana,


Can you please overwrite the below code. (under userform - select userform and press F7 and delete the old code and paste the below code it will work)


Private Sub MonthView1_DateClick(ByVal DateClicked As Date)

ThisWorkbook.ActiveSheet.Range("H7").Value = DateClicked

Unload Me

End Sub


Thanks,

Suresh Kumar S
 
Back
Top