Hi,
I'm looking for some vba that will enable me to refer to a wksheet name based on the contents of a cell.
My existing code is as follows:
Sheet15.Select
Range("A7:CU10000").Select
Selection.Copy
Sheet19.Select
Range("A7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A7").Select
I'm looking to replace the code 'Sheet19.Select' in the middle with the name of a wksheet that will be typed into cell B4. So, as an example, if I want the data to be pasted into a wksheet named '23' (the tab name), I will type the number '23' into B4 and then run the macro.
Hope this makes sense and you can help, many thanks.
I'm looking for some vba that will enable me to refer to a wksheet name based on the contents of a cell.
My existing code is as follows:
Sheet15.Select
Range("A7:CU10000").Select
Selection.Copy
Sheet19.Select
Range("A7").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Range("A7").Select
I'm looking to replace the code 'Sheet19.Select' in the middle with the name of a wksheet that will be typed into cell B4. So, as an example, if I want the data to be pasted into a wksheet named '23' (the tab name), I will type the number '23' into B4 and then run the macro.
Hope this makes sense and you can help, many thanks.