Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
SS SS is offline
external usenet poster
 
Posts: 32
Default Form Buttons Not Working

I have a form that will appear when my ecel file is opened. When one of the
command buttons is select, the form is hidden, a series of code is processed,
and the form is to reappear.

What actually happens is that the form reappears as it is supposed to, but
none of the buttons will respond to being selected.

I have tried to unload and load the form, with no success. Does anyone know
why the program is not jumping out of the module and back to letting the form
have control?

Thanks

SS
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default Form Buttons Not Working

You should probably hide the form rather than unload it.

Me.hide rather than unload me

--
Regards,
Tom Ogilvy


"SS" wrote in message
...
I have a form that will appear when my ecel file is opened. When one of

the
command buttons is select, the form is hidden, a series of code is

processed,
and the form is to reappear.

What actually happens is that the form reappears as it is supposed to, but
none of the buttons will respond to being selected.

I have tried to unload and load the form, with no success. Does anyone

know
why the program is not jumping out of the module and back to letting the

form
have control?

Thanks

SS



  #3   Report Post  
Posted to microsoft.public.excel.programming
SS SS is offline
external usenet poster
 
Posts: 32
Default Form Buttons Not Working

I have tried to "hide" and "show" and that does not work. The form will be
shown again, but none of the buttons work on it. You cannot even terminate
the form at that point.



"Tom Ogilvy" wrote:

You should probably hide the form rather than unload it.

Me.hide rather than unload me

--
Regards,
Tom Ogilvy


"SS" wrote in message
...
I have a form that will appear when my ecel file is opened. When one of

the
command buttons is select, the form is hidden, a series of code is

processed,
and the form is to reappear.

What actually happens is that the form reappears as it is supposed to, but
none of the buttons will respond to being selected.

I have tried to unload and load the form, with no success. Does anyone

know
why the program is not jumping out of the module and back to letting the

form
have control?

Thanks

SS




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 38
Default Form Buttons Not Working

What is the code behind the command button that hides it? I admit I'm
not a expert like Tom, but it seems that excel might be waiting on
something before, giving control back.



*** Sent via Developersdex http://www.developersdex.com ***
  #5   Report Post  
Posted to microsoft.public.excel.programming
SS SS is offline
external usenet poster
 
Posts: 32
Default Form Buttons Not Working

Private Sub UserForm_Terminate()
frmReport.Hide
Call RecoverFromError
End Sub

Sub RecoverFromError()
Workbooks("Work Order Master File").Activate
Workbooks.Open FileName:= _
"C:\Documents and Settings\" & UserName & "\My Documents\Work Order
Error File.xls"
Application.DisplayAlerts = False
Workbooks("Work Order Error File").Sheets(Array("Master List", "Drum Prep",
"Acids", "Solvents", "Top 5 Items", _
"Master Unscheduled List", "Search Criteria", "Test", "Acids PM's",
"Solvents PM's" _
)).Select
Sheets("Acids").Activate
Sheets(Array("Master List", "Drum Prep", "Acids", "Solvents", "Top 5 Items", _
"Master Unscheduled List", "Search Criteria", "Test", "Acids PM's",
"Solvents PM's" _
)).Copy
Sheets(Array("Master List", "Drum Prep", "Acids", "Solvents", "Top 5 Items", _
"Master Unscheduled List", "Search Criteria", "Test", "Acids PM's",
"Solvents PM's" _
)).Move Befo=Workbooks("Work Order Master File").Sheets(1)
Workbooks("Work Order Master File").Sheets(Array("Master List", "Drum Prep",
"Acids", "Solvents", "Top 5 Items", _
"Master Unscheduled List", "Search Criteria", "Test", "Acids PM's",
"Solvents PM's" _
)).Select
ActiveWindow.SelectedSheets.Delete
Sheets("Master List (2)").Name = "Master List"
Sheets("Drum Prep (2)").Name = "Drum Prep"
Sheets("Acids (2)").Name = "Acids"
Sheets("Solvents (2)").Name = "Solvents"
Sheets("Top 5 Items (2)").Name = "Top 5 Items"
Sheets("Master Unscheduled List (2)").Name = "Master Unscheduled List"
Sheets("Search Criteria (2)").Name = "Search Criteria"
Sheets("Test (2)").Name = "Test"
Sheets("Acids PM's (2)").Name = "Acids PM's"
Sheets("Solvents PM's (2)").Name = "Solvents PM's"
Application.DisplayAlerts = True
Workbooks("Work Order Error File").Close
Workbooks("Work Order Master File").Activate

frmReport.Show

End Sub

It seems to get hung up on the "frmReport.Show" command and does not give
control to the form.

Any suggestions would be wonderful. I have been beating my head into a wall
trying to figure out what tiny little thing I am missing to make this work.

Thanks

SS

"Darrin Henshaw" wrote:

What is the code behind the command button that hides it? I admit I'm
not a expert like Tom, but it seems that excel might be waiting on
something before, giving control back.



*** Sent via Developersdex http://www.developersdex.com ***

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
Form Buttons jay_2882 Excel Discussion (Misc queries) 1 August 12th 07 09:48 PM
Form buttons vs. ActiveX Buttons GeorgeJ Excel Discussion (Misc queries) 3 August 11th 07 09:02 PM
Form buttons Homer Excel Worksheet Functions 2 December 30th 06 07:39 PM
form/subform with buttons BAZ Excel Worksheet Functions 0 February 9th 06 04:20 PM
Form buttons and macros cadbury Excel Programming 1 November 12th 03 03:56 AM


All times are GMT +1. The time now is 01:26 AM.

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"