![]() |
Return to module after userform
Y'all are gonna get so tired of me...
OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
Return to module after userform
I would set a break point in the macro and then step through the code to find
the problem. Open VBA editor and press F9 on first line of code (nmot CONST or DIM statements). Then go back to excel spreadsheet and activate macro. Use F8 to step through code to locate the problem. "Clayman" wrote: Y'all are gonna get so tired of me... OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
Return to module after userform
You need to show the form from within your procedure, with extra code the
executes upon return from the userform. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Clayman" wrote in message ... Y'all are gonna get so tired of me... OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
Return to module after userform
Thanks, Joel.
Tried that. After it unloads the form, it just returns to the sheet. The problem is that occasionally faulty data comes in and crashes my macro. This is to catch the faulty data, ask for input and continue processing anyway. -- Adios, Clay Harryman "Joel" wrote: I would set a break point in the macro and then step through the code to find the problem. Open VBA editor and press F9 on first line of code (nmot CONST or DIM statements). Then go back to excel spreadsheet and activate macro. Use F8 to step through code to locate the problem. "Clayman" wrote: Y'all are gonna get so tired of me... OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
Return to module after userform
This is what I've got:
If IsError(.Cells(ediro,40)) = True Then If .Cells(ediro,40).Value = CVError(xlErrNA) Then With Form_VacRate .TBempname = empname .TBfilenum = empnum .Show End With End If End If Should I not rely on the Click() event? Simply continue processing after the ..Show? -- Adios, Clay Harryman "Bob Phillips" wrote: You need to show the form from within your procedure, with extra code the executes upon return from the userform. -- HTH Bob (there's no email, no snail mail, but somewhere should be gmail in my addy) "Clayman" wrote in message ... Y'all are gonna get so tired of me... OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
Return to module after userform
hi,
I didn't read your error question earlier. sorry. perhaps you need keep your posts within the thread. anyway... with event driven programing, programmers sometimes have to do funny song and dance routines to make the whole show work right. try busting your macro in 2. the end of the first would call the form. a button's click event on the form might call the rest of the macro. just a suggestion. regards FSt1 "Clayman" wrote: Y'all are gonna get so tired of me... OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
Return to module after userform
I've considered it. it's uglier than what I want to do, but it will work.
Thanks! When I originally posted, I didn't think the error code was pertinent to this question. Sorry! -- Adios, Clay Harryman "FSt1" wrote: hi, I didn't read your error question earlier. sorry. perhaps you need keep your posts within the thread. anyway... with event driven programing, programmers sometimes have to do funny song and dance routines to make the whole show work right. try busting your macro in 2. the end of the first would call the form. a button's click event on the form might call the rest of the macro. just a suggestion. regards FSt1 "Clayman" wrote: Y'all are gonna get so tired of me... OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
Return to module after userform
Found the answer. I'm gonna use INPUTBOX rather than the form. It resolves
the issue quite nicely. Thanks for all your help. I would still like to know how Joel's answer works, though. -- Adios, Clay Harryman "Clayman" wrote: Y'all are gonna get so tired of me... OK - with my error question earlier today, I need to call a userform, enter data, and return to processing the rest of the data. Problem is, when I click OK on the form, it unloads the form and stops processing. Basically, it terminates the module. How do I get it to continue processing after clicking OK? Right now, it relies on the BTNok_Click() event to process the data. Is this bad? -- Adios, Clay Harryman |
All times are GMT +1. The time now is 05:26 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com