Hi all,
this is where im having the issue and im unsure why.
thanks for any help guys!
Sheets("Management").Range(Cells(2, 1), Cells(finalrow, 1)).Select
Hi all,
this is where im having the issue and im unsure why.
thanks for any help guys!
Sheets("Management").Range(Cells(2, 1), Cells(finalrow, 1)).Select
you probably haven't assigned anything to finalrow (make sure the spelling's right).
p45cal
Everyone: If I've helped and you can't be bothered to acknowledge it, I can't be bothered to look at further posts from you.
If there is something valid in finalrow, then you might be not referencing the Management sheet. Some thoughts ...
With Sheets("Management") .Select Range(.Cells(2, 1), .Cells(finalrow, 1)).Select End With
No dot on Range, but dots on .Cells
Hi thanks for the help but ive suused it, i didnt know the sheet had to be active.
That's the main reason you should refrain form 'select' and 'activate' in VBA
It only has to be active because of the way you were using it
snb is very correct
If for example, you wanted to copy the data to a another sheet
That way it doesn't matter (aka "Keeps me out of trouble") which sheet is active, and it doesn't even have to be either of those twoWith Sheets("Management") call Range(.Cells(2, 1), .Cells(finalrow, 1)).Copy (Worksheets ("Summary").Cells(45,1)) End With
---------------------------------------------------------------------------------------------------------------------
Paul
Remember: Tell us WHAT you want to do, not HOW you think you want to do it
1. Use [CODE] ....[/CODE ] Tags for readability
[CODE]PasteYourCodeHere[/CODE ] -- (or paste your code, select it, click [#] button)
2. Upload an example
Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) / Upload Files / Done
3. Mark the thread as [Solved] when you have an answer
Thread Tools (on the top right corner, above the first message)
4. Read the Forum FAQ, especially the part about cross-posting in other forums
http://www.vbaexpress.com/forum/faq...._new_faq_item3
There should really be a dot in front of Range too. If the code is in the module for a different sheet, you'll get an error otherwise.
Be as you wish to seem