Hi All,
My code is as below
Is there anyway i can rename the the current worksheet with the content in Cell C3?Please Login or Register to view this content.
Regards,
Hi All,
My code is as below
Is there anyway i can rename the the current worksheet with the content in Cell C3?Please Login or Register to view this content.
Regards,
You don't need to activate workbooks like that.
How are you sure that you will paste to the correct cell, you assume in the code that the destination cell is selected, could be a problem if it isn't.
To name a sheet
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
i got this code from the Marco I recorded.
I am puzzled by this sentence of coding
When I remove the 'Offset(-24,-2), the whole marco will not work.Please Login or Register to view this content.
For my end product, I want to copy the selected cells,from A1 to C28, in 'main.xls', to a newly created sheet in 'Project Database.xls'.
I managed to rename the sheet.
Please Login or Register to view this content.
Are you sure that you recorded this line
I don't think he code is recorded, it makes little sense with the range references. I'm guessing at what you are doingPlease Login or Register to view this content.
Please Login or Register to view this content.
Yes. These are from my recorded marco.. ;-)
the code you provided failed at
My inital thinking was that the 'copied' items have not been 'pasted' yet, so it's a empty cell. I tried to shift thePlease Login or Register to view this content.
above the code, but it still fails.Please Login or Register to view this content.
is it that I need to set the new sheet as active, then i do a 'paste' then i rename my sheet based on C3 ?
I can see that it added a new sheet in the project database.xls
Try this
Please Login or Register to view this content.
fail atError Code: object does not support this property or methodPlease Login or Register to view this content.
I skip this step, it fails at the naming part. This i assume is because the cell is empty..
i look through excel help file and found this codeBut how do i point 'sheet1' as the newly created sheet?Please Login or Register to view this content.
It should automatically be the active sheet. There is a typo in the code
Please Login or Register to view this content.
Hi Roy,
I change it toSomehow 'Paste' doesn't work on my side..Please Login or Register to view this content.
Anyway, thanks
Is it working then? If so please mark your question solved
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks