Guys,
Don't know what is going on with this code - is there a problem with my vba?
Public Sub Declarations()
Dim wb As Workbook
Dim wbS As Workbook
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim ws3 As Worksheet
Dim ws4 As Worksheet
Dim wsS As Worksheet
Set wb = ThisWorkbook
Set ws1 = wb.Worksheets("Main")
Dim FileLoc As Range
Set FileLoc = ws1.Range("FileLoc")
End Sub
Sub Gather_Data()
Call Declarations
Set wbSource = Workbooks.Open(FileLoc)
When I run Gather_Date, i keep on getting a run time error, it does not know what fileloc is.
It is not remebering the values assigned to variables when i call a function from another? Cant figure this out -never had this issue before.
Thanks for your help
End Sub
Don't know what is going on with this code - is there a problem with my vba?
Public Sub Declarations()
Dim wb As Workbook
Dim wbS As Workbook
Dim ws1 As Worksheet
Dim ws2 As Worksheet
Dim ws3 As Worksheet
Dim ws4 As Worksheet
Dim wsS As Worksheet
Set wb = ThisWorkbook
Set ws1 = wb.Worksheets("Main")
Dim FileLoc As Range
Set FileLoc = ws1.Range("FileLoc")
End Sub
Sub Gather_Data()
Call Declarations
Set wbSource = Workbooks.Open(FileLoc)
When I run Gather_Date, i keep on getting a run time error, it does not know what fileloc is.
It is not remebering the values assigned to variables when i call a function from another? Cant figure this out -never had this issue before.
Thanks for your help
End Sub