How to read and copy values from one sheet to another sheet in the same workbook
Like yesterday I asked you to provide the solution for this problem statement. Once you practice the Excel Object (DOM) these are very simple methods to use. The point is at the very moment we do not remember… that is the problem. Here on this portal that is why I am sharing all this code.
In many interviews, interviewer confuses people with this syntax only. One letter here and one letter there and it will totally change.
Anyways, below is the code for copying one sheet to another sheet in the same workbook. Now, If I add two line of code to this then I can copy the whole sheet to the antoher workbook, another problem statement.
'Create Excel Object
Set Objexcel = CreateObject("Excel.Application")
'Make it Visible
'Open First Excel File
'Copy data from first Sheet viz. SMC01
'Paste data to another sheet viz SMC02
'Quit from Excel Application