Year dependent macros help??? Its quite urgent : )

K

KrisB_bacon

Dear Helpers,


I'm making a project to manage my school's geography department'
accounts and stock. I will try to explain my problems in as much detai
as possible within my capabilities.

I have recieved help from people such as yourselves before, bu
advanced knowledge over mine has led to me making mistakes. I reall
need some help again. Please see my attached spreadsheet. Please e-mai
me at (e-mail address removed) if you have any queries/would prefe
e-mail correspondence.

Here we go:

When you open the worksheet, you are requested to select the curren
year. This allows a year to be input into H23 in the Temp worksheet
This is then looked up in the Fieldtrips worksheet and it's macros
This is the year dependency I am using at the moment. This is part o
my desire to run macros according to what year it is. Previous hel
from this website has helped me to write macros and thier buttons t
run the No_fieldtrips

Location: Fieldtrips! worksheet

When the user presses the "Edit a Summer Fieldtrip" button, a macro i
run (called Fieldtrip_form) that displays a user form (calle
Fieldtripform). This user form asks the user to select a year from th
list and either click a Yes or a No button. My problem lies in the Ye
button and in the userform run after clicking the N
button(no_fieldtrip_selection). I have recieved help before tha
resulted in trying to type VB code that would result in, when the use
presses the Yes button, a Yes would be placed in the correct cel
(D4,D5,D6,D7,D8,D9 or D10) according to the year that was selected
However, when I click on the Yes button a compile error message appear
("compile error: invalid use of property") and I cannot find th
solution to the problem. Can you help?

Meanwhile when the No button is clicked, the no_fieldtrip_selectio
userform is displayed as intended.
When the user clicks on the No button, it runs another userfor
(no_fieldtrip_selection) and they select what year DOESN'T have
fieldtrip. I thought this work fine.
However, when one of the buttons in this no_fieldtrip_selectioi
userform is clicked on, the macro doesn't work and a run time erro
appears (when 2003 is clicked, a run-time error '424' message i
displayed) or a compile error appears (when 2005 is clicked, a compil
error is displayed). You can view this yourself as I have attached m
system with this posting. I think the solution lies in my input of th
complicated code that was suggested. I think it has many mistake
within it. I have little knowledge of the m_Col function(s) in VB. I
would be very helpful if you could explain what happens/what the cod
does, so that I could use it in the future. The other function that
do not fully understand is the If cell.....offset..(e.g. If cell
Val(FieldTripYear) Then) function. The previous helper set up the N
button and used the NoFieldtrips macro. Can this macro be used on an
column needed (any year) by just using the m_Col command? Can I do i
another way? Do I have to create a similar macro for each year (jus
changing the cells where appropriate.......tedious) or is there a shor
way to do it?

If you could help solve these problems it would make my life so muc
easier and I would be eternally grateful. Thx a lot for the help.

KrisB_baco

Attachment filename: geo system.xls
Download attachment: http://www.excelforum.com/attachment.php?postid=44449
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top