PDA

View Full Version : Setting Current Position equal to Last Position: Homework



sky02313
04-25-2008, 05:38 PM
Homework question here but I need help on how to fix this:

I need to assign the cell current position to the cell last position.

Cells(mintRow, mintCol) = Cells(mintLastRow, mintLastCol)

Every time I run the rest of my code I get a object-defined or application error and the debugger brings me to this line. What is wrong with this line?

Thanks

tpoynton
04-25-2008, 06:17 PM
thanks for openly asserting it is HW

the error is telling you it's not properly formed...think about your objective and the variables you have, and hopefully you've learned the VBA method to achieve the objective...this ain't it!

sky02313
04-25-2008, 06:27 PM
Is it setting the variables equal to each other? Like:

mintCol = mintLastCol
mintRow = mintLastRow

or do I need to set up an If statement? I just need guidance on how I would go about setting it up not the actual code.

tpoynton
04-25-2008, 06:38 PM
try what you have presented above, using the correct method for setting the location of the 'cell position.'

mdmackillop
04-27-2008, 07:23 AM
It is not clear from your question or your code exactly what you are trying to achieve. If you can post your whole code, properly commented, I'm sure we can give some better guidance.

mdmackillop
04-28-2008, 12:37 AM
David,
This is a homework question, and under our forum rules (see FAQ), we do not offer solutions. If you can rephrase your post to give guidance, that is permissable.
Regards
MD