Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
T.c.Goosen1977
 
Posts: n/a
Default I need some help with userforms


Private Sub CommandButton1_Click()
If CheckBox1 = True Then
Unload UserForm1
Sheet2.Activate
UserForm2.Show
Else
End If
End Sub

"userform1, in sheet1, contains the above code. So when i select the
checkboox "true" and click on the command but...then it unloads
userform1, activates, sheet2 and loads userform2....everything is
working perfectly...this far....then userform2 contains the following
code:

Sub UserForm_Initialize()
LabelZoom.Caption = ActiveWindow.Zoom
With ScrollBarZoom 'zoom
.Min = 10
.Max = 400
.SmallChange = 1
.LargeChange = 10
.Value = ActiveWindow.Zoom

End With
With ScrollBarColumns 'horizontal scrolling
.Min = 1
.Max = 256
.Value = ActiveWindow.ScrollColumn
.LargeChange = 25
.SmallChange = 1
End With

With ScrollBarRows
.Min = 1
.Max = ActiveSheet.Rows.Count
.Value = ActiveWindow.ScrollRow
.LargeChange = 25
.SmallChange = 1
End With
End Sub

Sub ScrollBarZoom_Change()
With ActiveWindow
.Zoom = ScrollBarZoom.Value
LabelZoom = .Zoom & "%"
.ScrollColumn = ScrollBarColumns.Value
.ScrollRow = ScrollBarRows.Value
End With
End Sub

Sub ScrollBarColumns_Change()
ActiveWindow.ScrollColumn = ScrollBarColumns.Value
End Sub

Sub ScrollBarRows_Change()
ActiveWindow.ScrollRow = ScrollBarRows.Value
End Sub

Sub userform_terminate()
Sheet1.Select
UserForm1.Show
End Sub


"with this code the userform2 allows the user to zoom & scroll the
active sheet2 with the controlls on the userform....and when I close
the user form it terminates the userform and loads userfrom1 in sheet1
again...working perfectly but when i repeat the cycle userform2 loads
perfectly within sheet2 but non of the controls to scroll or zoom the
sheet that i have created on the userform2 seems to work.....????


--
T.c.Goosen1977
------------------------------------------------------------------------
T.c.Goosen1977's Profile: http://www.excelforum.com/member.php...o&userid=35895
View this thread: http://www.excelforum.com/showthread...hreadid=557219

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
how to see only youre userforms?? tomro1 Excel Discussion (Misc queries) 1 June 15th 06 11:04 AM
userforms broblem Pierre via OfficeKB.com Excel Worksheet Functions 0 January 3rd 06 06:45 PM
Userforms & Pocket PC ajw150 Excel Discussion (Misc queries) 0 December 7th 05 12:44 PM
Creating UserForms Victor New Users to Excel 1 July 8th 05 07:57 PM
Open Userforms from a Dropdown list skid812pb Excel Discussion (Misc queries) 0 May 23rd 05 11:28 PM


All times are GMT +1. The time now is 05:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"