ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Error message (https://www.excelbanter.com/excel-discussion-misc-queries/183938-error-message.html)

WH99

Error message
 
I have a userform which when pressing CommandButton1 I get a error message
stating "Exception occurred"
What is that all about? Any ideas.
--
WH99

Gord Dibben

Error message
 
Some code and more description would be nice.

Your question is analogous to "my car won't run, why not?"


Gord Dibben MS Excel MVP

On Wed, 16 Apr 2008 08:45:01 -0700, WH99 wrote:

I have a userform which when pressing CommandButton1 I get a error message
stating "Exception occurred"
What is that all about? Any ideas.



Hans Perborn

Error message
 


"WH99" wrote:

I have a userform which when pressing CommandButton1 I get a error message
stating "Exception occurred"
What is that all about? Any ideas.
--
WH99


I have the same problem which appear intermittently.
Check this posting for some information
http://www.ozgrid.com/forum/showthread.php?t=23336
I know this might not be the solution to your problem but indicates some
problem with userforms. Perhaps we can pin down the issue bit by bit.

Another thing about userforms: In Access 2000 you can import and export
userforms but in Access 2003 they don't work after import. What you can do is
to create new userforms and transfer controls piece by piece from the old
ones and eventyually get the new userforms to work. however you still can't
export and reimport. I got a posting about this in another forum
microsoft.public.access.


WH99

Error message
 
Sorry Gord,
Here goes!!
I have the following:
UserForm8, commandbutton2 brings up UserForm3
UserForm3 has a TextBox1 which the search subject is inserted and
commandbutton1 to search.
Sheet1 (€śdetails€ť) has all the data in.

UserForm3:
TextBox1 properties: I have inserted in controlsource =details!f5001
CommandButton1 has the following code:
Option Explicit
Private Sub CommandButton1_Click()
Worksheets("details").Select
Cells.Range("A1").Select
UserForm3.Hide
UserForm8.Hide
End Sub

Sheet1(€śdetails€ť) has the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$F$5001" Then
Application.EnableEvents = False
If Target.Value = "" Then
ShowAllRecords
Else
Range("A3").CurrentRegion.AdvancedFilter _
Action:=xlFilterInPlace, CriteriaRange:= _
Range("G5002:G5003"), Unique:=False
End If
Application.EnableEvents = True
End If
End Sub

I have a modFilter with code;
Option Explicit
Sub ShowAllRecords()
If ActiveSheet.FilterMode Then
ActiveSheet.ShowAllData
End If
End Sub

Its when I press commandbutton1, userform3 I get the error €śException
occurred€ť



--
WH99


"Gord Dibben" wrote:

Some code and more description would be nice.

Your question is analogous to "my car won't run, why not?"


Gord Dibben MS Excel MVP

On Wed, 16 Apr 2008 08:45:01 -0700, WH99 wrote:

I have a userform which when pressing CommandButton1 I get a error message
stating "Exception occurred"
What is that all about? Any ideas.




WH99

Error message
 
Hans,
Thanks for that. I shall try the second option by redoing the userforms. I
shall get back to you to let you know whetther it worked
--
WH99


"Hans Perborn" wrote:



"WH99" wrote:

I have a userform which when pressing CommandButton1 I get a error message
stating "Exception occurred"
What is that all about? Any ideas.
--
WH99


I have the same problem which appear intermittently.
Check this posting for some information
http://www.ozgrid.com/forum/showthread.php?t=23336
I know this might not be the solution to your problem but indicates some
problem with userforms. Perhaps we can pin down the issue bit by bit.

Another thing about userforms: In Access 2000 you can import and export
userforms but in Access 2003 they don't work after import. What you can do is
to create new userforms and transfer controls piece by piece from the old
ones and eventyually get the new userforms to work. however you still can't
export and reimport. I got a posting about this in another forum
microsoft.public.access.


WH99

Error message
 
Found the problem.
It was all down to one cell being locked. All that was needed was to uncheck
the protection for that single cell.
--
WH99


"WH99" wrote:

I have a userform which when pressing CommandButton1 I get a error message
stating "Exception occurred"
What is that all about? Any ideas.
--
WH99



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

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com