ajcarlos18
New Member
- Joined
- Sep 4, 2017
- Messages
- 15
Hi,
Need your help and assistance on the debugging issue I encountered. I've been using a code that runs smoothly when generating the Macro. But when I run the program again using another data, debug issue occurs. I've run series of data combination with one sheet and some run smoothly, but mostly debug issue occurrence. This is the coding where I encountered the issue:
Hope you can help me with this one?
Thanks and More power,
Need your help and assistance on the debugging issue I encountered. I've been using a code that runs smoothly when generating the Macro. But when I run the program again using another data, debug issue occurs. I've run series of data combination with one sheet and some run smoothly, but mostly debug issue occurrence. This is the coding where I encountered the issue:
Rich (BB code):
Range("D2").Select
CountB = 0
Do While CountB = 0
If IsError(ActiveCell.Value) = True Then
ActiveCell.Offset(1, 0).Range("A1").Select -- Debug mode
ElseIf ActiveCell.Value = "" Then
CountB = 1
ElseIf ActiveCell.Offset(0, -1).Value = 1 Then
ActiveCell.Offset(1, 0).Select
Else
StorePg = ActiveCell.Offset(0, -1).Value
StoreA = ActiveCell.Offset(0, -3).Value
StoreB = ActiveCell.Offset(0, -2).Value
StoreNo = StorePg - 1 '*** newwwwwwwwwwwwwwwwwwwwwwwwwwwww
'=========
Do While StorePg > 1
ActiveCell.Offset(1, 0).Rows("1:1").EntireRow.Select
Selection.Insert Shift:=xlDown
ActiveCell.Select
ActiveCell.Value = StoreA
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.Value = StoreB
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.Value = StoreNo
ActiveCell.Offset(0, 1).Range("A1").Select
ActiveCell.FormulaR1C1 = _
"=""http://eyeshare/eyeshare1/getimage.asp?imageid=""& RC[-2] &""&docid="" & RC[-3] &""&resize=1&width=1100&rotate=0&page=""&RC[-1]"
StoreNo = StoreNo - 1 '*** newwwwwwwwwwwwwwwwwwwwwwwwwwwww
StorePg = StorePg - 1
'ActiveCell.Offset(1, 0).Range("A1").Select '**** newwwwwwwwwwwwwwwwwwww
Loop
'=========
End If
Loop
End If
Hope you can help me with this one?
Thanks and More power,
Last edited by a moderator: