Call module macro not working

behedwin

Active Member
Joined
Dec 10, 2014
Messages
399
I have activex buttons on my sheet.

i have this code in a module

Code:
Sub imghidd()
If extinstr1_label.Visible = False Then
extinstr1_label.Visible = True
extimage1_img.Visible = True
Else
extinstr1_label.Visible = False
extimage1_img.Visible = False
End If
End Sub

i have this code on my button click:

Code:
Private Sub Steg1Ext_button_Click()
imghidd
End Sub


I get the error variable not defined.
But the code still works. But always an error message

screenshot:
http://prntscr.com/ndjcod



How to solve this.
I have tried to type
sheet1. before the label and image name
But does not work.
 

Excel Facts

Wildcard in VLOOKUP
Use =VLOOKUP("Apple*" to find apple, Apple, or applesauce
i thought to call another macro you had to write Call then the macro.... e.g.

Code:
private sub Steg1Ext_button_click()
call imghidd
end sub
 
Last edited:
Upvote 0
extinstr1_label is not set
like:
Set extinstr1_label = < label_name ><label_name></label_name>
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,523
Messages
6,131,171
Members
449,627
Latest member
ChrisNoMates

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