In reply to your post y'day I indicated how you could move your results sheet to a new workbook. If you want to copy instead then substitute "copy" for "move" but this will not work if any of your cells have more than 255 characters.
Skip and Gerry indicated that you can save / create your macro in your personal workbook, (or just any other workbook).
This will enter values in a specific workbook and worksheet
Code:
Sub Macro3()
Workbooks("Book2").Worksheets("SHEET1").Range("B15:D18").FormulaR1C1 = "Hi"
End Sub
If you record yourself doing the same thing you will get similar code but with lots of activate and select statements that are not in fact necessary
Other Tips:
ThisWorkbook always means the workbook where the vba code is.
ActiveWorkbook will be the workbook you are using immediately prior to initiating the macro (although the macro could well change the active workbook).
Hope this gets you going. If not then be more specific about what your code is doing.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.