Issues with my coding or MS Excel??

SirCurious_VBAExcel

New Member
Joined
Sep 30, 2014
Messages
17
I created a Macro and it works on my end - I used MS Excel 2010 to code. Another person tried using the program on their end - using MS Excel 2010 - but one function doesn't work for them. There is no run-time error message, so what is causing this issues - firewall settings on their end, etc.?

The program populates a list box based on selected values - the user can run the macro, perform other functions, but one part doesn't work.

What do you think could be causing this issue?
 

Excel Facts

Workdays for a market open Mon, Wed, Friday?
Yes! Use "0101011" for the weekend argument in NETWORKDAYS.INTL or WORKDAY.INTL. The 7 digits start on Monday. 1 means it is a weekend.
Often times it is a missing reference/library.

Open up your VBA code in the VB Editor. Then click on Tools, then References, and note all the different references that are selected.
Then, have the user on the other end do the same thing, and compare note. Do they have all the same references selected that you do?

If that is not it, please post the code that is not working. If we see it, it may become more evident where issues could be occurring.
 
Upvote 0
Hi, Joe4,

Thank you for your timely response. I will have the user compare the user library references.

I was wondering, if this was an object library reference issue, or if their is an issue with the code, wouldn't the user receive some sort of error message??

Thanks,
Alex
 
Upvote 0
Can't really say. What exactly do you mean when you say "but one function doesn't work for them.". How does it not work? What is the behavior?

As I mentioned, it would be very helpful to see the VBA code of this function. Otherwise, all we are doing is just "speculating" what the issue is without having any idea what this function is supposed to be doing.
 
Upvote 0
Regarding the program:

Basically, clicking a value in a listbox, populates another listbox, etc. The issue is one listbox doesn't display the values it should have in it - it does on my computer and many others, but one person has the blank listbox. The code that should populate the listbox in question, is as follows:
------
Code:
With Worksheets("AG")
    Set Rng = .Range("A2", .Range("A2").End(xlDown))
End With


For Each cell In Rng.Cells
    If CInt(cell.Offset(0, 3).Value) = CInt(StartForm.CList.Value) Then
        If Len(cell.Offset(0, 2).Value) < 1 Then
            With Me.AGList
                .AddItem cell.Offset(0, 1).Value
                .List(.ListCount - 1, 1) = cell.Value
            End With
        End If
    End If
Next cell


AttGrpList.ColumnWidths = "120,0"

...

Private Sub AGList_Click()
Dim Rng, cell As Range


AVList.Clear
AVList.ColumnWidths = "120,0"


With Worksheets("AV")
    Set Rng = .Range("A2", .Range("A2").End(xlDown))
End With


For Each cell In Rng.Cells
    If (cell.Offset(0, 1).Value = AGList.Value) And (cell.Offset(0, 4).Value = "False") Then
        If Len(cell.Offset(0, 5)) < 1 Then
            With Me.AVList
                .AddItem cell.Offset(0, 2).Value
                .List(.ListCount - 1, 1) = cell.Value
            End With
        End If
    End If
Next cell
End Sub

Your thoughts?
 
Last edited by a moderator:
Upvote 0
My first thoughts would be to definitely check the Library References, since UserForms and List Boxes are involved.

If that looks OK, I would recommend stepping through the code line-by-line on the offending computer (using the F8 key). I usually recommend doing this where you can see what it is doing on the sheet at the same time (easy if you have two monitors, or if you just have one, resize the VBA code down to about 1/4 the size of the screen so you can see both). Then you can see exactly what is happening. Many times, it becomes quite apparent what the issue is when you see exactly what the macro is doing each step along the way.
 
Upvote 0
I was thinking the same thing. I just thought it was strange that no error message occurred on the "offending computer."

I appreciate your insight, Joe4.

Have a good one.
 
Upvote 0
I was thinking the same thing. I just thought it was strange that no error message occurred on the "offending computer."
Sometimes, it isn't an error, but rather it is working, just not doing what you think it should be doing.

I cannot tell you the number of times something like this has occurred to me, and it was "operator error", i.e. they had set-up or manipulated the worksheet in such a way that the code would not work properly for them.

I'll be curious to see what you find out.
 
Upvote 0
Iconfirmed that the user is using the correct Library References. I did forgetto mention that the user is from Canada, and her computer is all in French.Have you ever heard of foreign languages affecting Macros?

I wasable to view the user's computer screen, and it appears the TextBox columnwidths are not working correctly--therefore, no run-time error. The user isable to see "printed" values that should be hidden by the columnwidth parameters, and the user is unable to see "printed" values thatshould not be hidden.

Because Ishare this program with people around the world, would I have to customize eachmacro based on the type of error--let us say someone in Sweden is experiencinga different problem than this French user? Or is there a universal fixfor something like this? (Assuming the foreign language is causing theseissues).

Thanks.
 
Upvote 0

Forum statistics

Threads
1,214,405
Messages
6,119,315
Members
448,886
Latest member
GBCTeacher

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top