Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default show worksheet along with form

I have a workbook with several sheets and several forms. I'm having trouble
getting the appropriate worksheet to show when its related form is selected.
I have a commandbutton with an inital macro that imports my data into
sheet3. A form opens, but sheet3 is still in the background. I want sheet3
to close and before the form opens, I want to have sheet2 activated.
What I'm trying to accomplish is...
As the user inputs data into the form, to show worksheet in the background.
So the user can see where the data is going in. Is there a way to always
display cells where the data is being entered from the form as the form is
being completed?
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default show worksheet along with form

I figured out that it is my initial command button which is locking
everything up.
This command button is what runs all the macros. This is the code:

Private Sub CommandButton1_Click()
'Import data to sheet3
Call OpenDataFile
'Show sheet2 and get user info
Call OpenfrmUserForm
'Show Sheet2 and open appropriate form to match the data imported
Call SelectForm
End Sub

It appears that once I run this macro with a command button on my workbook,
it does not break out of it until it is done. This macro inputs my data and
opens 2 forms. How do I get it to display sheet2 before it opens the 2 forms?



"cj2k2k" wrote:

I have a workbook with several sheets and several forms. I'm having trouble
getting the appropriate worksheet to show when its related form is selected.
I have a commandbutton with an inital macro that imports my data into
sheet3. A form opens, but sheet3 is still in the background. I want sheet3
to close and before the form opens, I want to have sheet2 activated.
What I'm trying to accomplish is...
As the user inputs data into the form, to show worksheet in the background.
So the user can see where the data is going in. Is there a way to always
display cells where the data is being entered from the form as the form is
being completed?

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default show worksheet along with form

Do you want the user to be able to do stuff to sheet2?

If yes, then how about using two different macros.

Run the first, then stop.
let the user do what needs to be done
then have them start the second (with a second button)

cj2k2k wrote:

I figured out that it is my initial command button which is locking
everything up.
This command button is what runs all the macros. This is the code:

Private Sub CommandButton1_Click()
'Import data to sheet3
Call OpenDataFile
'Show sheet2 and get user info
Call OpenfrmUserForm
'Show Sheet2 and open appropriate form to match the data imported
Call SelectForm
End Sub

It appears that once I run this macro with a command button on my workbook,
it does not break out of it until it is done. This macro inputs my data and
opens 2 forms. How do I get it to display sheet2 before it opens the 2 forms?

"cj2k2k" wrote:

I have a workbook with several sheets and several forms. I'm having trouble
getting the appropriate worksheet to show when its related form is selected.
I have a commandbutton with an inital macro that imports my data into
sheet3. A form opens, but sheet3 is still in the background. I want sheet3
to close and before the form opens, I want to have sheet2 activated.
What I'm trying to accomplish is...
As the user inputs data into the form, to show worksheet in the background.
So the user can see where the data is going in. Is there a way to always
display cells where the data is being entered from the form as the form is
being completed?


--

Dave Peterson
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default show worksheet along with form

No, the user does not enter anything directly into sheet2. All the sheet 2
data is obtained with the forms. I wanted to make it as user friendly as
possible. I did not want to risk the user enter the wrong information into
wrong cells.
If I run the forms independent of the mentioned command button, they work
fine (sheet2 in the background of the form). How else can I run these macros
in that order without grouping then in the command button or is there another
way?
I used to run the macro automatically when the file was opened, which worked
but I wanted to give the user the option to start it.

"Dave Peterson" wrote:

Do you want the user to be able to do stuff to sheet2?

If yes, then how about using two different macros.

Run the first, then stop.
let the user do what needs to be done
then have them start the second (with a second button)

cj2k2k wrote:

I figured out that it is my initial command button which is locking
everything up.
This command button is what runs all the macros. This is the code:

Private Sub CommandButton1_Click()
'Import data to sheet3
Call OpenDataFile
'Show sheet2 and get user info
Call OpenfrmUserForm
'Show Sheet2 and open appropriate form to match the data imported
Call SelectForm
End Sub

It appears that once I run this macro with a command button on my workbook,
it does not break out of it until it is done. This macro inputs my data and
opens 2 forms. How do I get it to display sheet2 before it opens the 2 forms?

"cj2k2k" wrote:

I have a workbook with several sheets and several forms. I'm having trouble
getting the appropriate worksheet to show when its related form is selected.
I have a commandbutton with an inital macro that imports my data into
sheet3. A form opens, but sheet3 is still in the background. I want sheet3
to close and before the form opens, I want to have sheet2 activated.
What I'm trying to accomplish is...
As the user inputs data into the form, to show worksheet in the background.
So the user can see where the data is going in. Is there a way to always
display cells where the data is being entered from the form as the form is
being completed?


--

Dave Peterson

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default show worksheet along with form

If you just want a worksheet active when the form appears, you can select that
worksheet (well, if that workbook is the activeworkbook).

Private Sub CommandButton1_Click()
'Import data to sheet3
Call OpenDataFile
'Show sheet2 and get user info
Call OpenfrmUserForm
worksheets("sheet2").select
'or you can use:
'application.goto worksheets("sheet2").range("a1"),scroll:=true
'Show Sheet2 and open appropriate form to match the data imported
Call SelectForm
End Sub



cj2k2k wrote:

No, the user does not enter anything directly into sheet2. All the sheet 2
data is obtained with the forms. I wanted to make it as user friendly as
possible. I did not want to risk the user enter the wrong information into
wrong cells.
If I run the forms independent of the mentioned command button, they work
fine (sheet2 in the background of the form). How else can I run these macros
in that order without grouping then in the command button or is there another
way?
I used to run the macro automatically when the file was opened, which worked
but I wanted to give the user the option to start it.

"Dave Peterson" wrote:

Do you want the user to be able to do stuff to sheet2?

If yes, then how about using two different macros.

Run the first, then stop.
let the user do what needs to be done
then have them start the second (with a second button)

cj2k2k wrote:

I figured out that it is my initial command button which is locking
everything up.
This command button is what runs all the macros. This is the code:

Private Sub CommandButton1_Click()
'Import data to sheet3
Call OpenDataFile
'Show sheet2 and get user info
Call OpenfrmUserForm
'Show Sheet2 and open appropriate form to match the data imported
Call SelectForm
End Sub

It appears that once I run this macro with a command button on my workbook,
it does not break out of it until it is done. This macro inputs my data and
opens 2 forms. How do I get it to display sheet2 before it opens the 2 forms?

"cj2k2k" wrote:

I have a workbook with several sheets and several forms. I'm having trouble
getting the appropriate worksheet to show when its related form is selected.
I have a commandbutton with an inital macro that imports my data into
sheet3. A form opens, but sheet3 is still in the background. I want sheet3
to close and before the form opens, I want to have sheet2 activated.
What I'm trying to accomplish is...
As the user inputs data into the form, to show worksheet in the background.
So the user can see where the data is going in. Is there a way to always
display cells where the data is being entered from the form as the form is
being completed?


--

Dave Peterson


--

Dave Peterson


  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 18
Default show worksheet along with form

I tried both suggestion but still have the same issue. After doing more
research, I learned that the property on my form called ShowModal need to be
set to False. This works, I can move my form out of the way and observe the
data go into the cells as I complete the form. The "scroll:=true" works
great.
Thank you, Dave.

"Dave Peterson" wrote:

If you just want a worksheet active when the form appears, you can select that
worksheet (well, if that workbook is the activeworkbook).

Private Sub CommandButton1_Click()
'Import data to sheet3
Call OpenDataFile
'Show sheet2 and get user info
Call OpenfrmUserForm
worksheets("sheet2").select
'or you can use:
'application.goto worksheets("sheet2").range("a1"),scroll:=true
'Show Sheet2 and open appropriate form to match the data imported
Call SelectForm
End Sub



cj2k2k wrote:

No, the user does not enter anything directly into sheet2. All the sheet 2
data is obtained with the forms. I wanted to make it as user friendly as
possible. I did not want to risk the user enter the wrong information into
wrong cells.
If I run the forms independent of the mentioned command button, they work
fine (sheet2 in the background of the form). How else can I run these macros
in that order without grouping then in the command button or is there another
way?
I used to run the macro automatically when the file was opened, which worked
but I wanted to give the user the option to start it.

"Dave Peterson" wrote:

Do you want the user to be able to do stuff to sheet2?

If yes, then how about using two different macros.

Run the first, then stop.
let the user do what needs to be done
then have them start the second (with a second button)

cj2k2k wrote:

I figured out that it is my initial command button which is locking
everything up.
This command button is what runs all the macros. This is the code:

Private Sub CommandButton1_Click()
'Import data to sheet3
Call OpenDataFile
'Show sheet2 and get user info
Call OpenfrmUserForm
'Show Sheet2 and open appropriate form to match the data imported
Call SelectForm
End Sub

It appears that once I run this macro with a command button on my workbook,
it does not break out of it until it is done. This macro inputs my data and
opens 2 forms. How do I get it to display sheet2 before it opens the 2 forms?

"cj2k2k" wrote:

I have a workbook with several sheets and several forms. I'm having trouble
getting the appropriate worksheet to show when its related form is selected.
I have a commandbutton with an inital macro that imports my data into
sheet3. A form opens, but sheet3 is still in the background. I want sheet3
to close and before the form opens, I want to have sheet2 activated.
What I'm trying to accomplish is...
As the user inputs data into the form, to show worksheet in the background.
So the user can see where the data is going in. Is there a way to always
display cells where the data is being entered from the form as the form is
being completed?

--

Dave Peterson


--

Dave Peterson

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
SHow user form when opening workbook Wanna Learn Excel Discussion (Misc queries) 2 June 26th 07 06:30 PM
How can I show exponents in numerical form Tanjia Excel Discussion (Misc queries) 2 April 11th 07 12:08 AM
In Excel how do I show the contents of just 1 row as a form? Sasha Excel Discussion (Misc queries) 6 August 15th 06 12:22 PM
Having one form show another form's input? Lucosa New Users to Excel 3 June 13th 06 04:16 PM
How to display a form- to show status of the running program Joseph Excel Discussion (Misc queries) 2 May 31st 05 11:31 AM


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

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

About Us

"It's about Microsoft Excel"