venkiatmarut
11-26-2009, 09:26 AM
Hi,
Please help me out from this problem. I didn't understand what is wrong with my code.
I have an excel pivot table and I used macro to change the data into it. It is going and when it is changing the data it is showing the error as_
Run-time error '1004':
Cannot change this part of a Pivot Table report.
The code is as follows___
Dim s_value As String
'LOOP THROUGH ALL SELECTED CELLS AND FILL THE EMPTY CELLS WITH VALUE IN THE PRIOR NON EMPTY CELL
For Each c In ActiveWindow.RangeSelection.Cells
c.Select
If Len(c.Value) > 0 Then
s_value = c.Value
Else
c.NumberFormat = "@"
c.Value = CStr(s_value)
End If
Next c
s_value = ""
Please help me out.
Please help me out from this problem. I didn't understand what is wrong with my code.
I have an excel pivot table and I used macro to change the data into it. It is going and when it is changing the data it is showing the error as_
Run-time error '1004':
Cannot change this part of a Pivot Table report.
The code is as follows___
Dim s_value As String
'LOOP THROUGH ALL SELECTED CELLS AND FILL THE EMPTY CELLS WITH VALUE IN THE PRIOR NON EMPTY CELL
For Each c In ActiveWindow.RangeSelection.Cells
c.Select
If Len(c.Value) > 0 Then
s_value = c.Value
Else
c.NumberFormat = "@"
c.Value = CStr(s_value)
End If
Next c
s_value = ""
Please help me out.