• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Macro doesn't work in other computers

Hi,

This may sound funny but causes a lot of frustration to the creator. I have forwarded an excel sheet which got macros in it. The problem is few macros throwing up error but the same macro was running perfectly/completely in my computer.

Especially at the below lines;

Example; For i = 2 To CriteriaRange.Rows.Count


Did anyone come across the same issue? Can anyone provide some help on how to avoid this problem in future. This answer would be a great help.
 
Especially at the below lines;

1. For i = 2 To CriteriaRange.Rows.Count

2. ActiveSheet.Range("A" & Rows.Count).End(xlUp).Offset(1).PasteSpecial xlValues
Application.CutCopyMode = False

3. Dim sourceRange As Range, CriteriaRange As Range, Output As String
Set sourceRange = Range("A1:D10000") ' Set Source Area
Set CriteriaRange = Range("G7").CurrentRegion ' Set Criteria Area
With sourceRange
For i = 2 To CriteriaRange.Rows.Count
Output = ""
For j = 2 To sourceRange.Rows.Count
 
To understand and debugging the code.. can you please upload your file. It will help to resolve the problem fastly
 
Back
Top