Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9,101
Default 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

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default 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



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,942
Default 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

  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 95
Default 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

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
Returning a value forom a Module to a Userform CSUS_CE_Student[_2_] Excel Programming 3 April 23rd 07 08:44 AM
How to call a sub from UserForm Module Myles[_58_] Excel Programming 1 March 31st 06 04:40 AM
Userform/Module saziz[_16_] Excel Programming 3 October 17th 05 12:14 AM
Textbox in Userform not recognised by Module SuperJas Excel Programming 5 February 26th 04 07:11 PM
Delete userform/module using VB Rohit Thomas Excel Programming 5 July 16th 03 11:01 PM


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