Hi
In cell F25 on an excel spreadsheet called Other Ingot Stock I have the following formula:
='\\....\Stock List\VGF ingot stock\[All VGF Stock.xls]Total Length'!$G$7
which references a particular cell ($G$7) on a sheet called Total Length in the workbook All VGF Stock which is stored in the network address \\.... etc
I set the start value of a variable (A1) by refferring to this cell in the macro with this line of code:
If Sheets("Other Ingot Stock").Cells(6, 25) <> 0 Then A1 = (A1 + Sheets("Other Ingot Stock").Cells(6, 25))
In other words if F25 isn't blank then set variable A1 to the value in cell F25 and then the macro goes off and sorts by a specific code and adds the contents of a specific cell to A1. I would like to set the start value of A1 without referring to the formula in the cell . I have tried this:
A1 = Workbook("\\....\Stock List\VGF Stock").Worksheet("All VGF Stock").Cells("$G$7").Value
but it returns a compile error: sub or function not defined and the word Workbook is highlighted
In cell F25 on an excel spreadsheet called Other Ingot Stock I have the following formula:
='\\....\Stock List\VGF ingot stock\[All VGF Stock.xls]Total Length'!$G$7
which references a particular cell ($G$7) on a sheet called Total Length in the workbook All VGF Stock which is stored in the network address \\.... etc
I set the start value of a variable (A1) by refferring to this cell in the macro with this line of code:
If Sheets("Other Ingot Stock").Cells(6, 25) <> 0 Then A1 = (A1 + Sheets("Other Ingot Stock").Cells(6, 25))
In other words if F25 isn't blank then set variable A1 to the value in cell F25 and then the macro goes off and sorts by a specific code and adds the contents of a specific cell to A1. I would like to set the start value of A1 without referring to the formula in the cell . I have tried this:
A1 = Workbook("\\....\Stock List\VGF Stock").Worksheet("All VGF Stock").Cells("$G$7").Value
but it returns a compile error: sub or function not defined and the word Workbook is highlighted