Reputation: 23
I have a very complex excel macro workbook. The VBA code seems to run pretty well on PC's at my location. As soon as I send it to a German colleague it fails to run in unexpected locations of the code.
The last problem I came across is a Runtime error 5
when the code try to modify the Caption
of a UserForm
(and some text boxes and cmd buttons as well).
Previously we faced with the same issue with SlicerCache(x).ClearManualFilter
but somehow I healed itself...
My first thought was to break up the nest With
and see which row causes the fail, but it's immediately the first row. I assume it'll do the same for all rows.
I have checked the windows and office settings:
sub
called by a CommandButton_Click
event, and calls the user form zurueckExport
. The form is deisgned so that can called for differnet purposes, so the captions have to be modified according to the needs.
Public Sub verExport()
With zurueckExport
.Caption = "Version Exportieren zum Creo"
.Label1.Caption = "Welche Version möchten Sie zum Creo exportieren?"
.CommandButtonExportieren.Visible = True
.CommandButtonZurueckladen.Visible = False
.CommandButtonKennlinie.Visible = False
.KennlinieFormat.Visible = False
.Show
End With
End Sub
Upvotes: 0
Views: 221
Reputation: 23
The captions were too long, that generated the error message on the other computer.
Resolution:
I have added several different labels to the UserForm
and modify their visibility instead of overwrite the caption.
Many thanks for @J0eBl4ck for the idea.
Upvotes: 1