Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Buttons in another window

Hi All,

I I have more than one window of a workbook, buttons work only on window No.
1.

Can it be achieved somehow that buttons work on other wondows, too?

--
Regards!
Stefi

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Buttons in another window


you need to have a macro for each button but the macros can call a
common subroutine located in a module

place in a vba sheet

Private Sub CommandButton1_Click()
Call Commonbutton(ActiveSheet)
End Sub


Place in a moudle

Sub Commonbutton(Sht as Variant)



end Sub


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=160217

Microsoft Office Help

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Buttons in another window

Many thanks Joel, I'm going to try it.

--
Regards!
Stefi



€žjoel€ť ezt Ă*rta:


you need to have a macro for each button but the macros can call a
common subroutine located in a module

place in a vba sheet

Private Sub CommandButton1_Click()
Call Commonbutton(ActiveSheet)
End Sub


Place in a moudle

Sub Commonbutton(Sht as Variant)



end Sub


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=160217

Microsoft Office Help

.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Buttons in another window

Unfortunately it didn't work. If a sheet is in a window other than window 1,
buttons don't work at all, no macro is triggered. Pushing action is not
animated like in cases when the button works.
--
Regards!
Stefi



€žStefi€ť ezt Ă*rta:

Many thanks Joel, I'm going to try it.

--
Regards!
Stefi



€žjoel€ť ezt Ă*rta:


you need to have a macro for each button but the macros can call a
common subroutine located in a module

place in a vba sheet

Private Sub CommandButton1_Click()
Call Commonbutton(ActiveSheet)
End Sub


Place in a moudle

Sub Commonbutton(Sht as Variant)



end Sub


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=160217

Microsoft Office Help

.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Buttons in another window


Do you mean sheet 1? Select each button and right click. then select
view code. Excel will automatically create the macro in the proper
location. The button number is probably different.

I usually change the Name in the button property to something revelent
like RunAddition(). Then change the macro name of the click function to
match the name property like Private Sub RunAddition_Click().


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=160217

Microsoft Office Help



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 35,218
Default Buttons in another window

I think it's an old bug that controls from the control toolbox toolbar won't
work when there are two windows into the same worksheet--the commandbutton in
the top window works, but the commandbutton in the bottom window doesn't (for
example).

Maybe you could replace the commandbuttons from the control toolbox toolbar with
buttons from the Forms toolbar.

(Or remove the window????)

Stefi wrote:

Hi All,

I I have more than one window of a workbook, buttons work only on window No.
1.

Can it be achieved somehow that buttons work on other wondows, too?

--
Regards!
Stefi


--

Dave Peterson
  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Buttons in another window

Thanks, Dave, two windows is an essential part of my present project, I'm
going to try Forms toolbar.

I use Excel2003, do you have any information on fixing this bug in Excel2007?

--
Regards!
Stefi



€žDave Peterson€ť ezt Ă*rta:

I think it's an old bug that controls from the control toolbox toolbar won't
work when there are two windows into the same worksheet--the commandbutton in
the top window works, but the commandbutton in the bottom window doesn't (for
example).

Maybe you could replace the commandbuttons from the control toolbox toolbar with
buttons from the Forms toolbar.

(Or remove the window????)

Stefi wrote:

Hi All,

I I have more than one window of a workbook, buttons work only on window No.
1.

Can it be achieved somehow that buttons work on other wondows, too?

--
Regards!
Stefi


--

Dave Peterson
.

  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,646
Default Buttons in another window

Thanks, Joel, I'm going to give it a try!
--
Regards!
Stefi



€žjoel€ť ezt Ă*rta:


Do you mean sheet 1? Select each button and right click. then select
view code. Excel will automatically create the macro in the proper
location. The button number is probably different.

I usually change the Name in the button property to something revelent
like RunAddition(). Then change the macro name of the click function to
match the name property like Private Sub RunAddition_Click().


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=160217

Microsoft Office Help

.

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Buttons in another window

On dec. 14, 10:50, Stefi wrote:
Thanks, Joel, I'm going to give it a try!
--
Regards!
Stefi

„joel” ezt írta:





Do you mean sheet 1? *Select each button and right click. *then select
view code. *Excel will automatically create the macro in the proper
location. *The button number is probably different.


I usually change the Name in the button property to something revelent
like RunAddition(). *Then change the macro name of the click function to
match the name property like Private Sub RunAddition_Click().


--
joel
------------------------------------------------------------------------
joel's Profile: 229
View this thread:http://www.thecodecage.com/forumz/sh...d.php?t=160217


Microsoft Office Help


.- Idézett szöveg elrejtése -


- Idézett szöveg megjelenítése -


I tried it, Joel, but it didn't help. It's interesting: If I have the
two windows already at design time then The new button works in the
second window until second window is not closed and opened again.
After re-opening a second window the button stops working in the
second window, it works only in the 1st window.
I couldn't find any other workaround than Dave's suggestion to use
Forms buttons (it works, thanks to Dave for it!).
Regards,
Stefi
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
how to save a desired window size but hv window comeup fullsz by d smjm1982 Excel Discussion (Misc queries) 1 February 15th 08 11:10 AM
View cell contents as a pop-up window (similar to comments window) Oldersox Excel Worksheet Functions 1 February 6th 08 07:09 AM
The window opens in a smaller window not full sized window. Rachael Excel Discussion (Misc queries) 0 November 7th 06 09:04 PM
Min/Max/Close buttons have disappeared from worksheet window Joodle Excel Discussion (Misc queries) 1 September 5th 05 12:42 AM
VB FORMs, buttons, window properties carlaruge Excel Programming 1 February 26th 04 11:44 PM


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