Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel,microsoft.public.excel.programming,microsoft.public.excel.worksheetfunctions,microsoft.public.excel.worksheet.functions
|
|||
|
|||
newbie questions
I'm new at excel so bear with me.
I built a sheet and it has a button i attached some vba code to. Now i cant get back to that code, the button still works ok but i want to add some code beyond what is there First... How do i get back to the code attached to the button? When i do tools/macros/vb editor the code isn't there, nor is the routine listed in either of the procedure drop down boxes. Next... I have a text box, can i set up a formula to put the date/time in the text box (or with a macro) can it refresh on a timer (say once per minute?)? Next... One column in my sheet has date/times in it, i want to color the background of the cells in that column based on certain criteria: A: if the date is the same as today - green B: any other date besides today but earlier than today and only the first instance of that including duplicates - yellow C: always ignore the time in this field and when doing the comparison just use the date. Finally, is there anything resembling a hierarchy of stuff? I mean, some kind of org chart or list showing the methods, properties, and events attached to each item on the tree of excel? ie: what methods properties events etc are part of Worksheet? are part of Cells , Are part of workbook? Are part of a textbox? etc etc, with that it should be easy to browse and figure out what you want to do and at least make an educated guess as to the syntax to use. Without it your just wild ass guessing and drawing only from what you already know without any hope of doing something new. Thanks for your patience, Eric |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie questions
Eric,
1) Right-click on the sheet tab, select View code from there, and see if the code is in the window that pops up 2) Use conditional formatting (all these examples assume you select your range, and it starts in B1 A: formula of =B1=TODAY(), select patter and choose green B: formula of =AND(B1<TODAY(),COUNTIF($B$1:B1,B1)=1), shoose the yellow 3) Look at the object browser in the VBE, and look for Microsoft Excel Objects in VBA help -- HTH RP (remove nothere from the email address if mailing direct) "Eric" wrote in message news:tjvvd.653268$mD.511957@attbi_s02... I'm new at excel so bear with me. I built a sheet and it has a button i attached some vba code to. Now i cant get back to that code, the button still works ok but i want to add some code beyond what is there First... How do i get back to the code attached to the button? When i do tools/macros/vb editor the code isn't there, nor is the routine listed in either of the procedure drop down boxes. Next... I have a text box, can i set up a formula to put the date/time in the text box (or with a macro) can it refresh on a timer (say once per minute?)? Next... One column in my sheet has date/times in it, i want to color the background of the cells in that column based on certain criteria: A: if the date is the same as today - green B: any other date besides today but earlier than today and only the first instance of that including duplicates - yellow C: always ignore the time in this field and when doing the comparison just use the date. Finally, is there anything resembling a hierarchy of stuff? I mean, some kind of org chart or list showing the methods, properties, and events attached to each item on the tree of excel? ie: what methods properties events etc are part of Worksheet? are part of Cells , Are part of workbook? Are part of a textbox? etc etc, with that it should be easy to browse and figure out what you want to do and at least make an educated guess as to the syntax to use. Without it your just wild ass guessing and drawing only from what you already know without any hope of doing something new. Thanks for your patience, Eric |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie questions
Hi Eric
see answers in-line below "Eric" wrote in message news:tjvvd.653268$mD.511957@attbi_s02... I'm new at excel so bear with me. I built a sheet and it has a button i attached some vba code to. Now i cant get back to that code, the button still works ok but i want to add some code beyond what is there First... How do i get back to the code attached to the button? When i do tools/macros/vb editor the code isn't there, nor is the routine listed in either of the procedure drop down boxes. depends on how you created the button ... but try right mouse clicking and you should see ASSIGN MACRO or similar. So just create your macro in a module in the VBE Window and then assign it this way. IF you can't see anything resembling assign macro, let us know how you created the button. Note: If by "i built a sheet" you mean created a userform (insert/userform) you get code onto the buttons by double clicking on them. Next... I have a text box, can i set up a formula to put the date/time in the text box (or with a macro) can it refresh on a timer (say once per minute?)? where is the text box ... if it's on a worksheet (created by using the drawing toolbar) ... you can do this by using a cell somewhere on the sheet that you can format the font white and can ignore. In that cell type =NOW() and then click on the text box, click in the formula bar and type =A1 (or whatever the cell reference is) ... to get it to update regularly you'll need a timer type macro - i don't have one to hand, however a google search should turn one up or i'm sure someone can provide one for you. Next... One column in my sheet has date/times in it, i want to color the background of the cells in that column based on certain criteria: A: if the date is the same as today - green B: any other date besides today but earlier than today and only the first instance of that including duplicates - yellow C: always ignore the time in this field and when doing the comparison just use the date. not 100% sure on this one Finally, is there anything resembling a hierarchy of stuff? I mean, some kind of org chart or list showing the methods, properties, and events attached to each item on the tree of excel? ie: what methods properties events etc are part of Worksheet? are part of Cells , Are part of workbook? Are part of a textbox? etc etc, with that it should be easy to browse and figure out what you want to do and at least make an educated guess as to the syntax to use. Without it your just wild ass guessing and drawing only from what you already know without any hope of doing something new. in the VBE window have a look at view / object browser or under help search for excel object module. Thanks for your patience, hope others will fill in the blank ... just a note though, when posting to the ng it is best just to ask one question each post as it makes it easier for people reading & replying to them. Eric |
#4
Posted to microsoft.public.excel.programming,microsoft.public.excel.worksheet.functions,microsoft.public.excel
|
|||
|
|||
newbie questions
1. If you used a button from the forms toolbar you can just right click it,
select assign macro and click edit 2. Click in the text box, click in the formula bar, type = and click in the cell with the date. I don't think a timer is a good idea, here's a link though http://www.cpearson.com/excel/ontime.htm 3. Take a look at formatconditional formatting for colouring cells/fonts based on conditions (up to 3, 4 is non event is one conditions as well) 4. Don't ask too many questions at once. It's better that you ask one question, test out the answer, post another question and so on.. Regards, Peo Sjoblom "Eric" wrote: I'm new at excel so bear with me. I built a sheet and it has a button i attached some vba code to. Now i cant get back to that code, the button still works ok but i want to add some code beyond what is there First... How do i get back to the code attached to the button? When i do tools/macros/vb editor the code isn't there, nor is the routine listed in either of the procedure drop down boxes. Next... I have a text box, can i set up a formula to put the date/time in the text box (or with a macro) can it refresh on a timer (say once per minute?)? Next... One column in my sheet has date/times in it, i want to color the background of the cells in that column based on certain criteria: A: if the date is the same as today - green B: any other date besides today but earlier than today and only the first instance of that including duplicates - yellow C: always ignore the time in this field and when doing the comparison just use the date. Finally, is there anything resembling a hierarchy of stuff? I mean, some kind of org chart or list showing the methods, properties, and events attached to each item on the tree of excel? ie: what methods properties events etc are part of Worksheet? are part of Cells , Are part of workbook? Are part of a textbox? etc etc, with that it should be easy to browse and figure out what you want to do and at least make an educated guess as to the syntax to use. Without it your just wild ass guessing and drawing only from what you already know without any hope of doing something new. Thanks for your patience, Eric |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
newbie questions
if you're new with Excel; run away while you still can learn Access-- you can build a report once instead of copying and pasting the same report 100 times. LoL "Eric" wrote in message news:tjvvd.653268$mD.511957@attbi_s02... I'm new at excel so bear with me. I built a sheet and it has a button i attached some vba code to. Now i cant get back to that code, the button still works ok but i want to add some code beyond what is there First... How do i get back to the code attached to the button? When i do tools/macros/vb editor the code isn't there, nor is the routine listed in either of the procedure drop down boxes. Next... I have a text box, can i set up a formula to put the date/time in the text box (or with a macro) can it refresh on a timer (say once per minute?)? Next... One column in my sheet has date/times in it, i want to color the background of the cells in that column based on certain criteria: A: if the date is the same as today - green B: any other date besides today but earlier than today and only the first instance of that including duplicates - yellow C: always ignore the time in this field and when doing the comparison just use the date. Finally, is there anything resembling a hierarchy of stuff? I mean, some kind of org chart or list showing the methods, properties, and events attached to each item on the tree of excel? ie: what methods properties events etc are part of Worksheet? are part of Cells , Are part of workbook? Are part of a textbox? etc etc, with that it should be easy to browse and figure out what you want to do and at least make an educated guess as to the syntax to use. Without it your just wild ass guessing and drawing only from what you already know without any hope of doing something new. Thanks for your patience, Eric |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Newbie Questions | Excel Discussion (Misc queries) | |||
Newbie Questions ? | New Users to Excel | |||
newbie questions | Excel Worksheet Functions | |||
Newbie VBA questions | Excel Programming | |||
Newbie - two questions | Excel Programming |