Howdy, Tek-Tippers! I'm at wit's end on this one and could really use some help.
Below is my Userform_INITIALIZE code
------------------------------------------------------
Private Sub Userform_initialize()
Align(0) = "0 - Top Left"
Align(1) = "1 - Top Right"
Align(2) = "2 - Center"
Align(3) = "3 - Bottom Left"
Align(4) = "4 - Bottom Right"
SpinButton1.Min = 0
SpinButton1.Max = 4
SpinButton1.Value = 0
Application.EnableEvents = False
TextBox1.Text = Align(ActiveSheet.Dynamic_Image.PictureAlignment)
Select Case ActiveSheet.Dynamic_Image.PictureSizeMode
Case fmPictureSizeModeClip
OptionButton1.Value = True
Case fmPictureSizeModeStretch
OptionButton2.Value = True
Case fmPictureSizeModeZoom
OptionButton3.Value = True
End Select
Select Case [Image_Source].Columns.Count
Case 3
OptionButton4.Value = True 'wide
Case 2
OptionButton5.Value = True 'square
Case 1
OptionButton6.Value = True 'tall
End Select
Application.EnableEvents = True
End Sub
--------------------------------------------------------
As expected, this routine fires properly upon loading - and prior to showing - the Userform.
Here's my two issues:
[1] Why is the initialize proc also firing when I UNLOAD the Userform????? And how can I STOP it?
[2] You'll notice two sets of OptionButtons (1 thru 3) and (4 thru 6) are in separate frames. Why are the Commandbuttons' CLICK events firing when I initialize the buttons' value (i.e. TRUE) ??? And how can I stop this too?
FYI - The Commandbutton CLICK code is not included, but is within a "Private Sub CommandButton1_Click ()"
T H A N K I N A D V A N C E ! ! ! !
TMKTECH
Below is my Userform_INITIALIZE code
------------------------------------------------------
Private Sub Userform_initialize()
Align(0) = "0 - Top Left"
Align(1) = "1 - Top Right"
Align(2) = "2 - Center"
Align(3) = "3 - Bottom Left"
Align(4) = "4 - Bottom Right"
SpinButton1.Min = 0
SpinButton1.Max = 4
SpinButton1.Value = 0
Application.EnableEvents = False
TextBox1.Text = Align(ActiveSheet.Dynamic_Image.PictureAlignment)
Select Case ActiveSheet.Dynamic_Image.PictureSizeMode
Case fmPictureSizeModeClip
OptionButton1.Value = True
Case fmPictureSizeModeStretch
OptionButton2.Value = True
Case fmPictureSizeModeZoom
OptionButton3.Value = True
End Select
Select Case [Image_Source].Columns.Count
Case 3
OptionButton4.Value = True 'wide
Case 2
OptionButton5.Value = True 'square
Case 1
OptionButton6.Value = True 'tall
End Select
Application.EnableEvents = True
End Sub
--------------------------------------------------------
As expected, this routine fires properly upon loading - and prior to showing - the Userform.
Here's my two issues:
[1] Why is the initialize proc also firing when I UNLOAD the Userform????? And how can I STOP it?
[2] You'll notice two sets of OptionButtons (1 thru 3) and (4 thru 6) are in separate frames. Why are the Commandbuttons' CLICK events firing when I initialize the buttons' value (i.e. TRUE) ??? And how can I stop this too?
FYI - The Commandbutton CLICK code is not included, but is within a "Private Sub CommandButton1_Click ()"
T H A N K I N A D V A N C E ! ! ! !
TMKTECH