Macro for floating button

  • Follow


I created a macro and assigned it to a form button in excel 2007.  What I 
would like if for this button to move (up or down) the same direction that 
I'm scrolling.  Is this possibly?
0
Reply Utf 1/21/2010 4:12:04 PM

Place the button in row 1 then freeze panes.


Gord Dibben  MS Excel MVP

On Thu, 21 Jan 2010 08:12:04 -0800, Gilbert
<Gilbert@discussions.microsoft.com> wrote:

>I created a macro and assigned it to a form button in excel 2007.  What I 
>would like if for this button to move (up or down) the same direction that 
>I'm scrolling.  Is this possibly?

0
Reply Gord 1/21/2010 4:46:14 PM

An alternative is to put the button on a custom toolbar, since toolbars are 
easy to float.
-- 
Gary''s Student - gsnu200909


"Gord Dibben" wrote:

> Place the button in row 1 then freeze panes.
> 
> 
> Gord Dibben  MS Excel MVP
> 
> On Thu, 21 Jan 2010 08:12:04 -0800, Gilbert
> <Gilbert@discussions.microsoft.com> wrote:
> 
> >I created a macro and assigned it to a form button in excel 2007.  What I 
> >would like if for this button to move (up or down) the same direction that 
> >I'm scrolling.  Is this possibly?
> 
> .
> 
0
Reply Utf 1/21/2010 7:37:01 PM

Put it on a modeless userform. Or onto the ribbon.

HTH. Bst wishes Harald

"Gilbert" <Gilbert@discussions.microsoft.com> wrote in message 
news:07BEAC63-3128-4FC9-9396-39281AD1C9DB@microsoft.com...
>I created a macro and assigned it to a form button in excel 2007.  What I
> would like if for this button to move (up or down) the same direction that
> I'm scrolling.  Is this possibly? 

0
Reply Harald 1/21/2010 7:38:17 PM

I apologize for not responding sooner but I still wanted to thank you for 
your suggestion.

"Gord Dibben" wrote:

> Place the button in row 1 then freeze panes.
> 
> 
> Gord Dibben  MS Excel MVP
> 
> On Thu, 21 Jan 2010 08:12:04 -0800, Gilbert
> <Gilbert@discussions.microsoft.com> wrote:
> 
> >I created a macro and assigned it to a form button in excel 2007.  What I 
> >would like if for this button to move (up or down) the same direction that 
> >I'm scrolling.  Is this possibly?
> 
> .
> 
0
Reply Utf 1/25/2010 3:29:01 PM

I apologize for not responding sooner but I still wanted to thank you for 
your suggestion.  But how can I make the toolbar float in 2007?

"Gary''s Student" wrote:

> An alternative is to put the button on a custom toolbar, since toolbars are 
> easy to float.
> -- 
> Gary''s Student - gsnu200909
> 
> 
> "Gord Dibben" wrote:
> 
> > Place the button in row 1 then freeze panes.
> > 
> > 
> > Gord Dibben  MS Excel MVP
> > 
> > On Thu, 21 Jan 2010 08:12:04 -0800, Gilbert
> > <Gilbert@discussions.microsoft.com> wrote:
> > 
> > >I created a macro and assigned it to a form button in excel 2007.  What I 
> > >would like if for this button to move (up or down) the same direction that 
> > >I'm scrolling.  Is this possibly?
> > 
> > .
> > 
0
Reply Utf 1/25/2010 3:30:01 PM

I apologize for not responding sooner but I still wanted to thank you for 
your suggestion.  I'm not familiar with modeless userform, how do I use that?

"Harald Staff" wrote:

> Put it on a modeless userform. Or onto the ribbon.
> 
> HTH. Bst wishes Harald
> 
> "Gilbert" <Gilbert@discussions.microsoft.com> wrote in message 
> news:07BEAC63-3128-4FC9-9396-39281AD1C9DB@microsoft.com...
> >I created a macro and assigned it to a form button in excel 2007.  What I
> > would like if for this button to move (up or down) the same direction that
> > I'm scrolling.  Is this possibly? 
> 
> .
> 
0
Reply Utf 1/25/2010 3:31:01 PM

If all your users are running xl2k or higher, you can add a parm on the .show
statement.  

UserForm1.Show False

See VBA's help for more info.

Gilbert wrote:
> 
> I apologize for not responding sooner but I still wanted to thank you for
> your suggestion.  I'm not familiar with modeless userform, how do I use that?
> 
> "Harald Staff" wrote:
> 
> > Put it on a modeless userform. Or onto the ribbon.
> >
> > HTH. Bst wishes Harald
> >
> > "Gilbert" <Gilbert@discussions.microsoft.com> wrote in message
> > news:07BEAC63-3128-4FC9-9396-39281AD1C9DB@microsoft.com...
> > >I created a macro and assigned it to a form button in excel 2007.  What I
> > > would like if for this button to move (up or down) the same direction that
> > > I'm scrolling.  Is this possibly?
> >
> > .
> >

-- 

Dave Peterson
0
Reply Dave 1/25/2010 3:54:33 PM

Actually, excel's VBA has its own constants for use with .Show.

Constant    Value          Description 
vbModal       1      UserForm is modal. Default. 
vbModeless    0      UserForm is modeless. 

So I should have suggested:
UserForm1.Show vbmodeless

(False will be treated as 0, so it'll work, but it's less descriptive.)


Dave Peterson wrote:
> 
> If all your users are running xl2k or higher, you can add a parm on the .show
> statement.
> 
> UserForm1.Show False
> 
> See VBA's help for more info.
> 
> Gilbert wrote:
> >
> > I apologize for not responding sooner but I still wanted to thank you for
> > your suggestion.  I'm not familiar with modeless userform, how do I use that?
> >
> > "Harald Staff" wrote:
> >
> > > Put it on a modeless userform. Or onto the ribbon.
> > >
> > > HTH. Bst wishes Harald
> > >
> > > "Gilbert" <Gilbert@discussions.microsoft.com> wrote in message
> > > news:07BEAC63-3128-4FC9-9396-39281AD1C9DB@microsoft.com...
> > > >I created a macro and assigned it to a form button in excel 2007.  What I
> > > > would like if for this button to move (up or down) the same direction that
> > > > I'm scrolling.  Is this possibly?
> > >
> > > .
> > >
> 
> --
> 
> Dave Peterson

-- 

Dave Peterson
0
Reply Dave 1/25/2010 4:07:58 PM

8 Replies
1582 Views

(page loaded in 0.108 seconds)


Reply: