File name as a variable

P

Patrick Simonds

In the code below, is there any way to replace the referance to "Vacation
Mark-up (PT Drivers) 2007.xls" with a variable which returns the current
document name?


Private Sub Add_Name_Click()

Unload EmployeeList

Application.EnableEvents = False
Application.ScreenUpdating = False

Windows("EmployeeList.xls").Activate
Range("A300").Select

Application.Run "EmployeeList.xls!UpdateName"

Workbooks("Vacation - Leave Book Master.xls").Activate

Application.ScreenUpdating = True
EmployeeList.Show

Application.EnableEvents = True

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top