hendrixharrison
Technical User
I may have change one of the syntax accidentally that is why this code isnt working anymore. Can anyone tell me why the paste: xlValues part is not working anymore?
It parses fine on Excel but the result is that nothing happens except for getting rid of the ODBC links. Formulas still appear on the sheets even though this code has ran.
Thanks
--------------------------------------
For Each wksht1 In Worksheets
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
With ActiveSheet.UsedRange
.Value = .Value
End With
If Application.ODBCErrors.Count = 0 Then
Do While (wksht1.QueryTables.Count >= 1)
wksht1.QueryTables(1).Delete
Loop
End If
Next wksht1
It parses fine on Excel but the result is that nothing happens except for getting rid of the ODBC links. Formulas still appear on the sheets even though this code has ran.
Thanks
--------------------------------------
For Each wksht1 In Worksheets
Selection.Copy
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
With ActiveSheet.UsedRange
.Value = .Value
End With
If Application.ODBCErrors.Count = 0 Then
Do While (wksht1.QueryTables.Count >= 1)
wksht1.QueryTables(1).Delete
Loop
End If
Next wksht1