Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 12
Default NEW USER WOULD LIKE HELP WITH A COUPLE OF PROBLEMS

NEW USER WOULD LIKE HELP WITH A COUPLE OF PROBLEMS

I'd like some help with these problems

1) I want to get a command button on a userform in sheet 1
to
close sheet 1 then open sheet 2 and point to a
command button
on that sheet called
MenuButton which will then open a
userform on sheet 2 called ClientForm

I've done this in the workbook code

Private Sub MenuButton_Click()

Dim ClientForm As UserForm
ClientForm.Show
MenuButton.Show

End Sub

And this in the userform code on sheet 1

Option Explicit
'declaring a form level variable shtProductAdd as a worksheet
Dim shtProductAdd As Worksheet 'this is for worksheet 1
Dim shtClientAdd As Worksheet 'this is for sheet 2


Private Sub ClientButton2_Click()
Dim Fiddling As Workbook
Dim MenuButton As CommandButton
Me.Hide
Dim shtClientAdd As Worksheet
Set shtClientAdd = Workbooks("Fiddling").Worksheets("clients")
MenuButton.Show

End Sub



It doesn't work

2)Next - I want to get a command button on sheet 2's userform called
SummaryButton
to open a userform on sheet 3 called SummaryForm

I've tried this -
Private Sub SummaryButton_Click()
Me.Hide
SummaryForm.Show
End Sub

On the userform on sheet 2

As you can guess Im good at getting things to work. This one does open
the userform
But on sheet 2

3) Next

I've put a list box on the userform on sheet 2

I've used this code to enter some items in it

In the userform initialize I've put



And I've put this on the useform code as well - ; big help that

Private Sub ListBox1_Click()


Dim ListBox1 As ListBox
'select ............default list box
'lstBox1.ListIndex = 0

ListBox1.AddItem "M&M's plain (500g)"
ListBox1.AddItem "M&M's peanut (500g)"
ListBox1.AddItem "Cadbury Cherry Ripe Bars (300g)"
ListBox1.AddItem "Cadbury Twirl Bars (300g)"
ListBox1.AddItem "Cadbury Caramello Bars (300g)"
ListBox1.AddItem "Cadbury Snack Bars (300g)"
ListBox1.AddItem "Cadbury Peppermint Bars (300g)"
ListBox1.AddItem "Cadbury Hazelnut Bars (300g)"

End Sub


As usual
I'm good at getting things to work
NOTHING DISPLAYS ................funny that

4) And also

I've got a text box on the sheet2 userform with this code

Private Sub TextBox1_Change()

Dim TextBox1 As String

Dim iRow As Long
Dim iCol As Long

Dim shtClientAdd As Worksheet
Set shtClientAdd = _
Application.Workbooks("Fiddling").Worksheets("clie nts")
TextBox1 = TextBox
With shtClientAdd
iRow = .Cells(.Rows.Count, "A").End(xlUp). _
Offset(1, 0).Row
iCol = .Cells(1, .Columns.Count).End(xlToLeft). _
Offset(0, 1).Column
End With

End Sub

Which surprisingly goes no where and after entering data there
Nothings on the sheet and a completely independent so far uncoded
Command button on that form becomes highlighted

I would greatly appreciate help

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 363
Default NEW USER WOULD LIKE HELP WITH A COUPLE OF PROBLEMS

Can you not just use something like:
Sheet2.Select
Userform2.show

??


wrote in message
ups.com...
NEW USER WOULD LIKE HELP WITH A COUPLE OF PROBLEMS

I'd like some help with these problems

1) I want to get a command button on a userform in sheet 1
to
close sheet 1 then open sheet 2 and point to a
command button
on that sheet called
MenuButton which will then open a
userform on sheet 2 called ClientForm

I've done this in the workbook code

Private Sub MenuButton_Click()

Dim ClientForm As UserForm
ClientForm.Show
MenuButton.Show

End Sub

And this in the userform code on sheet 1

Option Explicit
'declaring a form level variable shtProductAdd as a worksheet
Dim shtProductAdd As Worksheet 'this is for worksheet 1
Dim shtClientAdd As Worksheet 'this is for sheet 2


Private Sub ClientButton2_Click()
Dim Fiddling As Workbook
Dim MenuButton As CommandButton
Me.Hide
Dim shtClientAdd As Worksheet
Set shtClientAdd = Workbooks("Fiddling").Worksheets("clients")
MenuButton.Show

End Sub



It doesn't work

2)Next - I want to get a command button on sheet 2's userform called
SummaryButton
to open a userform on sheet 3 called SummaryForm

I've tried this -
Private Sub SummaryButton_Click()
Me.Hide
SummaryForm.Show
End Sub

On the userform on sheet 2

As you can guess Im good at getting things to work. This one does open
the userform
But on sheet 2

3) Next

I've put a list box on the userform on sheet 2

I've used this code to enter some items in it

In the userform initialize I've put



And I've put this on the useform code as well - ; big help that

Private Sub ListBox1_Click()


Dim ListBox1 As ListBox
'select ............default list box
'lstBox1.ListIndex = 0

ListBox1.AddItem "M&M's plain (500g)"
ListBox1.AddItem "M&M's peanut (500g)"
ListBox1.AddItem "Cadbury Cherry Ripe Bars (300g)"
ListBox1.AddItem "Cadbury Twirl Bars (300g)"
ListBox1.AddItem "Cadbury Caramello Bars (300g)"
ListBox1.AddItem "Cadbury Snack Bars (300g)"
ListBox1.AddItem "Cadbury Peppermint Bars (300g)"
ListBox1.AddItem "Cadbury Hazelnut Bars (300g)"

End Sub


As usual
I'm good at getting things to work
NOTHING DISPLAYS ................funny that

4) And also

I've got a text box on the sheet2 userform with this code

Private Sub TextBox1_Change()

Dim TextBox1 As String

Dim iRow As Long
Dim iCol As Long

Dim shtClientAdd As Worksheet
Set shtClientAdd = _
Application.Workbooks("Fiddling").Worksheets("clie nts")
TextBox1 = TextBox
With shtClientAdd
iRow = .Cells(.Rows.Count, "A").End(xlUp). _
Offset(1, 0).Row
iCol = .Cells(1, .Columns.Count).End(xlToLeft). _
Offset(0, 1).Column
End With

End Sub

Which surprisingly goes no where and after entering data there
Nothings on the sheet and a completely independent so far uncoded
Command button on that form becomes highlighted

I would greatly appreciate help


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
HELP WITH A COUPLE OF SIMPLE FORMULAS FOR A NEW USER [email protected] Excel Programming 2 April 16th 07 04:01 AM
CountIF with multiple criteria... couple of problems driving me nuts, help? [email protected] Excel Worksheet Functions 2 March 9th 07 10:34 PM
Problems with user created command bar [email protected] Excel Programming 2 February 8th 06 09:52 PM
New user with a couple of questions.... B Craig Excel Discussion (Misc queries) 6 February 11th 05 10:15 PM
Problems with User-defined Function Victor[_4_] Excel Programming 2 April 29th 04 08:18 PM


All times are GMT +1. The time now is 07:14 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"