Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default adding a toolbar function to an excel cell



Hi

I'm trying to run a toolbar function (Refresh All) , from cell M20.

I'd rather do this than have it placed on the toolbar.

Is it possible to do this?

Grateful for any advice.



Best Wishes
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default adding a toolbar function to an excel cell

hi
you can't put the icon refresh all in the cell but you could use the before
double click event on the cell to run a macro.
right click the sheet that contains the cell you want to activate the refresh.
click view code and paste this macro in the code window.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

careful. the first line wrapped.

post back if problems.

Regards
FSt1

"Colin Hayes" wrote:



Hi

I'm trying to run a toolbar function (Refresh All) , from cell M20.

I'd rather do this than have it placed on the toolbar.

Is it possible to do this?

Grateful for any advice.



Best Wishes
.

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 465
Default adding a toolbar function to an excel cell


Hi

OK thanks for you help with this.

I'm afraid I can't unscramble the code. I inserted it into the sheet ,
but it gives error after error when I try to apply it.

It seems to have lost all formatting in the email , so I don't know
where to split the lines , unfortunately.

Best wishes



In article , FSt1
writes
hi
you can't put the icon refresh all in the cell but you could use the before
double click event on the cell to run a macro.
right click the sheet that contains the cell you want to activate the refresh.
click view code and paste this macro in the code window.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

careful. the first line wrapped.

post back if problems.

Regards
FSt1

"Colin Hayes" wrote:



Hi

I'm trying to run a toolbar function (Refresh All) , from cell M20.

I'd rather do this than have it placed on the toolbar.

Is it possible to do this?

Grateful for any advice.



Best Wishes
.


  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default adding a toolbar function to an excel cell

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

The <space_ after ByVal is known as a "continuation character" and allows
long lines of code to be be wrapped.


Gord Dibben MS Excel MVP


On Mon, 11 Jan 2010 23:50:01 +0000, Colin Hayes
wrote:


Hi

OK thanks for you help with this.

I'm afraid I can't unscramble the code. I inserted it into the sheet ,
but it gives error after error when I try to apply it.

It seems to have lost all formatting in the email , so I don't know
where to split the lines , unfortunately.

Best wishes



In article , FSt1
writes
hi
you can't put the icon refresh all in the cell but you could use the before
double click event on the cell to run a macro.
right click the sheet that contains the cell you want to activate the refresh.
click view code and paste this macro in the code window.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

careful. the first line wrapped.

post back if problems.

Regards
FSt1

"Colin Hayes" wrote:



Hi

I'm trying to run a toolbar function (Refresh All) , from cell M20.

I'd rather do this than have it placed on the toolbar.

Is it possible to do this?

Grateful for any advice.



Best Wishes
.


  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 3,942
Default adding a toolbar function to an excel cell

thanks gord. i did warn about that but you got back before i did.

regards
FSt1

"Gord Dibben" wrote:

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

The <space_ after ByVal is known as a "continuation character" and allows
long lines of code to be be wrapped.


Gord Dibben MS Excel MVP


On Mon, 11 Jan 2010 23:50:01 +0000, Colin Hayes
wrote:


Hi

OK thanks for you help with this.

I'm afraid I can't unscramble the code. I inserted it into the sheet ,
but it gives error after error when I try to apply it.

It seems to have lost all formatting in the email , so I don't know
where to split the lines , unfortunately.

Best wishes



In article , FSt1
writes
hi
you can't put the icon refresh all in the cell but you could use the before
double click event on the cell to run a macro.
right click the sheet that contains the cell you want to activate the refresh.
click view code and paste this macro in the code window.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

careful. the first line wrapped.

post back if problems.

Regards
FSt1

"Colin Hayes" wrote:



Hi

I'm trying to run a toolbar function (Refresh All) , from cell M20.

I'd rather do this than have it placed on the toolbar.

Is it possible to do this?

Grateful for any advice.



Best Wishes
.


.



  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 22,906
Default adding a toolbar function to an excel cell

I noticed, but who RTFM<g


Gord

On Mon, 11 Jan 2010 20:52:01 -0800, FSt1
wrote:

thanks gord. i did warn about that but you got back before i did.

regards
FSt1

"Gord Dibben" wrote:

Private Sub Worksheet_BeforeDoubleClick(ByVal _
Target As Range, Cancel As Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

The <space_ after ByVal is known as a "continuation character" and allows
long lines of code to be be wrapped.


Gord Dibben MS Excel MVP


On Mon, 11 Jan 2010 23:50:01 +0000, Colin Hayes
wrote:


Hi

OK thanks for you help with this.

I'm afraid I can't unscramble the code. I inserted it into the sheet ,
but it gives error after error when I try to apply it.

It seems to have lost all formatting in the email , so I don't know
where to split the lines , unfortunately.

Best wishes



In article , FSt1
writes
hi
you can't put the icon refresh all in the cell but you could use the before
double click event on the cell to run a macro.
right click the sheet that contains the cell you want to activate the refresh.
click view code and paste this macro in the code window.
Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Not Intersect(Target, Range("M20")) Is Nothing Then
ActiveWorkbook.RefreshAll
Else
Exit Sub
End If
End Sub

careful. the first line wrapped.

post back if problems.

Regards
FSt1

"Colin Hayes" wrote:



Hi

I'm trying to run a toolbar function (Refresh All) , from cell M20.

I'd rather do this than have it placed on the toolbar.

Is it possible to do this?

Grateful for any advice.



Best Wishes
.


.


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
Adding a macro to a toolbar Dudley Excel Discussion (Misc queries) 7 March 17th 09 03:42 PM
adding "dictionary" to excel quick-access toolbar susie margaret Excel Discussion (Misc queries) 1 February 25th 09 09:06 AM
Adding a cell reference to an if then function Timmah18 Excel Discussion (Misc queries) 4 November 24th 07 08:24 AM
Adding a Function to a cell when inserting a row from a macro Mbarnes Excel Worksheet Functions 0 May 31st 06 04:38 PM
Insert Function "FX" on Toolbar in Excel Rich Excel Discussion (Misc queries) 4 January 16th 05 03:04 PM


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