Hi guys,
Is there a VBA code that copies a cell from a worksheet to a merged cell in another worksheet?
I have attached a sample excel below which explains what I am trying to achieve clearly.
Any help will be highly appreciated.
Thanks
Hi guys,
Is there a VBA code that copies a cell from a worksheet to a merged cell in another worksheet?
I have attached a sample excel below which explains what I am trying to achieve clearly.
Any help will be highly appreciated.
Thanks
Try (put in the Sheet2 module):
See attached fyi.Please Login or Register to view this content.
Hi berlan,
It works perfectly fine but is there anyway i can use the code in a module then apply it to a button on sheet2?
I don't want the code to be activated unless i click the button on the worksheet.
Many thanks in advance.
Jin
Hi,
(1) link this macro to a button/shape to run it from, or (2) add a Command Button under Developer (ribbon, make sure to activate) > Insert> ActiveX Controls: Command Buttons. Then right click on the command button and "view code", and adding the code within the Sub below.
Hope that helps.Please Login or Register to view this content.
Last edited by berlan; 07-03-2015 at 03:18 AM.
Hi berlan,
I am trying ti avoid using command button for some reasons so your first suggestion would suit me better. However, when i link the code to the button that i have on my worksheet, it brings the following error message 'user-defined type not defined'.
Any suggestions?
Many thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks