View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.programming
JulieD JulieD is offline
external usenet poster
 
Posts: 618
Default 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