B
BEEJAY
The body of this macro was cut and pasted from this ng.
The only adjustment made was to change the cell to B2
When I try to run it, it puts #VALUE! in cell B2.
The file was saved (a number of times) prior to running the macro.
The cell was checked and it is formatted as "General".
What else can I check/change?
' WSNCOPY Macro
' From Dave Peterson
Dim wks As Worksheet
Dim myFormula As String
myFormula _
= "=MID(CELL(""filename"",a1),FIND(""]"",CELL(""filename"",a1))+1,255)"
For Each wks In ActiveWorkbook.Worksheets
With wks
.Range("B2").Formula = myFormula
End With
Next wks
End Sub
The only adjustment made was to change the cell to B2
When I try to run it, it puts #VALUE! in cell B2.
The file was saved (a number of times) prior to running the macro.
The cell was checked and it is formatted as "General".
What else can I check/change?
' WSNCOPY Macro
' From Dave Peterson
Dim wks As Worksheet
Dim myFormula As String
myFormula _
= "=MID(CELL(""filename"",a1),FIND(""]"",CELL(""filename"",a1))+1,255)"
For Each wks In ActiveWorkbook.Worksheets
With wks
.Range("B2").Formula = myFormula
End With
Next wks
End Sub