ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Macro needed to Paste Values and prevent Macro operation (https://www.excelbanter.com/excel-discussion-misc-queries/30129-macro-needed-paste-values-prevent-macro-operation.html)

thunderfoot

Macro needed to Paste Values and prevent Macro operation
 
Sub Macro1()
'
'
Dim myBk As Workbook
Set myBk = Workbooks.Open(Application.GetOpenFilename(, , "Select the File"))

Range("To_Database").Copy ThisWorkbook.Worksheets(1).Range("A65536").End(xlU p)(1).Offset(2, 1)

myBk.Close False

End Sub


In the above macro I need to prevent macros operating in the External File when it opens. I also need the Named Range ("To_Database") from the External File to be copied into the file from which this macro operates as PasteValues.

At the moment the Formula in the Named Range is coming across, so that I'm creating an External Formula Link.

How can I do this???


All times are GMT +1. The time now is 01:18 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com