ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   get file name inside a macro on Excel (https://www.excelbanter.com/excel-worksheet-functions/114691-get-file-name-inside-macro-excel.html)

Get a file name inside a macro

get file name inside a macro on Excel
 
I need to insert a pause inside a macro, then browse (throught Insert,
Picture, From file) copy the file name, put inside of a variable and resume
the macro.
Any help will be very appreciated.
Thank you

Bernie Deitrick

get file name inside a macro on Excel
 

Dim FName As String
FName = Application.GetOpenFilename
MsgBox FName

HTH,
Bernie
MS Excel MVP


"Get a file name inside a macro" <Get a file name inside a wrote in
message ...
I need to insert a pause inside a macro, then browse (throught Insert,
Picture, From file) copy the file name, put inside of a variable and resume
the macro.
Any help will be very appreciated.
Thank you




Eleazar

get file name inside a macro on Excel
 
Thank you very much for your help, was very useful simple and elegant.


All times are GMT +1. The time now is 06:32 PM.

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