![]() |
Chip Pearson or someone
Which procedure are you using, the date formatting code or the time
formatting code? More importantly, what do you mean when you say the code does not work. Specifically what does or does not happen? -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "drum118" wrote in message ... Can someone tell me why I am having a problem with books that have been save using "DateTimeEntry" code? I have copy and pasted the code from the http://www.cpearson.com/excel/DateTimeEntry.htm website and made only one change ("A1:A10") to ("MyTimeCols") since I have more than one col that require this code. Cols that use this code are Name either MyTimeCols or MyTimeCols1. I have no problem with the code when creating a new book before I save it and close it. When I open the one of the save books to add more date to the book, the code does not work. Thanks |
Chip Pearson or someone
drum
I would guess that you didn't put the procedure in the right place. Open the VBE (Alt-F11) and in the project explorer, find your project. Under your project will be a folder called Microsoft Excel Objects and in that folder will be a class module for ThisWorkbook and one for each sheet in the workbook. Open the class module for the sheet that you are using and paste the code in there. The two dropdown boxes at the top of the code pane should say Worksheet and Change from left to right. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "drum118" wrote in message ... Chip Pearson wrote: Which procedure are you using, the date formatting code or the time formatting code? More importantly, what do you mean when you say the code does not work. Specifically what does or does not happen? -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "drum118" wrote in message ... Can someone tell me why I am having a problem with books that have been save using "DateTimeEntry" code? I have copy and pasted the code from the http://www.cpearson.com/excel/DateTimeEntry.htm website and made only one change ("A1:A10") to ("MyTimeCols") since I have more than one col that require this code. Cols that use this code are Name either MyTimeCols or MyTimeCols1. I have no problem with the code when creating a new book before I save it and close it. When I open the one of the save books to add more date to the book, the code does not work. Thanks I am using time; If I type a new time in one of the MyTimeCols like 1234 I get 0:00. When I click on the cell it show 5/18/1903 12:00:00 AM where the other cells are 9:27:00 PM for the (2127)21:27 that was type in before saving and closing book the first time. Security is set for low. |
Chip Pearson or someone
Dick Kusleika wrote:
drum I would guess that you didn't put the procedure in the right place. Open the VBE (Alt-F11) and in the project explorer, find your project. Under your project will be a folder called Microsoft Excel Objects and in that folder will be a class module for ThisWorkbook and one for each sheet in the workbook. Open the class module for the sheet that you are using and paste the code in there. The two dropdown boxes at the top of the code pane should say Worksheet and Change from left to right. -- Dick Kusleika MVP - Excel www.dicks-clicks.com Post all replies to the newsgroup. "drum118" wrote in message ... Chip Pearson wrote: Which procedure are you using, the date formatting code or the time formatting code? More importantly, what do you mean when you say the code does not work. Specifically what does or does not happen? -- Cordially, Chip Pearson Microsoft MVP - Excel www.cpearson.com "drum118" wrote in message ... Can someone tell me why I am having a problem with books that have been save using "DateTimeEntry" code? I have copy and pasted the code from the http://www.cpearson.com/excel/DateTimeEntry.htm website and made only one change ("A1:A10") to ("MyTimeCols") since I have more than one col that require this code. Cols that use this code are Name either MyTimeCols or MyTimeCols1. I have no problem with the code when creating a new book before I save it and close it. When I open the one of the save books to add more date to the book, the code does not work. Thanks I am using time; If I type a new time in one of the MyTimeCols like 1234 I get 0:00. When I click on the cell it show 5/18/1903 12:00:00 AM where the other cells are 9:27:00 PM for the (2127)21:27 that was type in before saving and closing book the first time. Security is set for low. Thanks!! It works now as I copy the code from worksheet to workbook. I have only 1 sheet in each book and every time I look at the code it was there and could not figure why it would not work. Did not know about saving the code by workbook and now learn some thing new. This is not my main area of work, so I don't know all the ends and outs for VB. |
All times are GMT +1. The time now is 12:46 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com