LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Userform troubles!

Hi folks!

I have created a userform which works in every way that i want except
problems firstly the combobox works outside of the range i have set i.
no matter which cell i select the combo box pops up and secondly whe
ive made a selection if i was to make another on any other sheet othe
than the first, the activecell will always jump to the previous cel
selected changing the data just entered....any thoughts?

Heres the code!

Option Explicit

Private Sub Worksheet_SelectionChange(ByVal Target As Range)
Dim sh As Object
Dim myrange As Range
Dim ComboBox1
Dim I1 As Integer
Dim res As Variant
Dim arySheets
On Error Resume Next

'If sh.Range = ("Hidden") Then
'Exit Sub
'End If

With arySheets
Set myrange = Range("E3:H641")
If Not Intersect(myrange, Target) Is Nothing Then
Sheets("Alpha Packing").Select
ActiveWindow.ScrollWorkbookTabs Position:=xlLast
arySheets = Array("Alpha Packing", "Alpha Process", "Bulk
H&I", _
"Corn Process", "33 Bldg Packing", "Ctd Cor
Packing", _
"2 & 3 Coating", "Crispix", "Feed"
"Flavour", _
"Jet Zones", "Manpower Tasks", "MPD", "Plan
Awareness", _
"Rice Cooking", "Vehicle Drivers (plant)"
"VIP", _
"15-21 & 22", "4&5 Coating", "Tank Floor 15
33 Bldg")
Sheets(arySheets).Select
Sheets("Alpha Packing").Activate

UserForm1.Show
End If

If ActiveCell.Text = "Ref:E-mail" Then
MsgBox "Send E-mail to Training to Have Skill Added!"
'Shell ("cmd /k C:\notes\notes.exe")


'Range("A" & ActiveCell.Row).Select
End If
If Not IsError(res) Then


ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Alpha Packing").Select
Exit Sub
Worksheets("hidden").Visible = False

End If

I1 = MsgBox("Please try again " & vbCrLf & _
"Skill " & " Entry not recognised " & _
"Please Contact Training Dept to Add Skil
Title!!")
If ActiveCell < "shift " Then
Range("A" & ActiveCell.Row).Select
ActiveWindow.ScrollWorkbookTabs Position:=xlFirst
Sheets("Alpha Packing").Select
End If

End With
End Sub

And heres the combobox code..........

Private Sub ComboBox1_Change()
Dim myrng As Range
On Error Resume Next
'If myrange < ("E3:H641") Then
'End Sub
'End If
ActiveCell.Select
ActiveCell.Value = ComboBox1.Value
Unload UserForm1
'UserForm1.Hide
Range("A" & ActiveCell.Row).Select
End Sub

hope you can help....
Simo

--
Message posted from http://www.ExcelForum.com

 
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
Troubles Jonas Krogh Excel Discussion (Misc queries) 1 October 22nd 09 11:14 AM
graphing troubles trouble.. Excel Discussion (Misc queries) 2 March 4th 09 10:10 PM
COM Add-in Troubles Howard Excel Discussion (Misc queries) 0 May 22nd 07 01:59 PM
Chart troubles [email protected] Excel Worksheet Functions 2 May 12th 07 02:36 PM
IF troubles JG Excel Worksheet Functions 6 December 24th 06 04:58 AM


All times are GMT +1. The time now is 03:08 PM.

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

About Us

"It's about Microsoft Excel"