ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Open a Workbook using a Command Button (https://www.excelbanter.com/excel-discussion-misc-queries/226750-open-workbook-using-command-button.html)

aussiegirlone

Open a Workbook using a Command Button
 
Is there a code for a command Button to open a Workbook to enter New Data

Gary''s Student

Open a Workbook using a Command Button
 
Assign this macro to your button:

Sub dural()
Workbooks.Open Filename:=Application.GetOpenFilename()
End Sub
--
Gary''s Student - gsnu200843


"aussiegirlone" wrote:

Is there a code for a command Button to open a Workbook to enter New Data


aussiegirlone

Open a Workbook using a Command Button
 
Thankyou Gary, the macro works well to open the folder where the workbooks
are stored, but I still have to click onto the workbook I want to open. so
this macro is not exactly the way I want it to be, as it does not open the
actual workbook needed.

"Gary''s Student" wrote:

Assign this macro to your button:

Sub dural()
Workbooks.Open Filename:=Application.GetOpenFilename()
End Sub
--
Gary''s Student - gsnu200843


"aussiegirlone" wrote:

Is there a code for a command Button to open a Workbook to enter New Data



All times are GMT +1. The time now is 08:16 PM.

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