I met a problem when I want to write a VBA to copy the data from a specific path to another workbook
Sub Scorecard()
Dim Target_Workbook As Workbook
Dim Templete As Workbook
Dim Path As String
Dim a As Long
a = InputBox(Prompt:="Week End Date:", _
Title:="Enter Your Week End Date ", Default:="")
Path = "C:\Users\Pudge\Desktop\Report\Scorecard\"&a"\Scorecard.xlsx"
Set Target_Workbook = Workbooks.Open(Path)
Set Template = ThisWorkbook
End Sub
I want to use the variable a to direct the path go different folder based on the a I provided;
Since In the folder Scorecard, there are many sub folders with name for example 1, 2,3,4,5; so what I want to do is if I give the vaule 1 for a, let go to open the scorecard.xlsx in the folder 1.
But it keeps give me compile error..
Please offer me a help if you have any idea.
Thx Pudge