ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Attach macro to a cell (https://www.excelbanter.com/excel-discussion-misc-queries/164072-attach-macro-cell.html)

Marco

Attach macro to a cell
 
Can you attach a macro to a cell which when clicked activates the macro or
can you attach a macro to a button/shape inbedded in a form as before
activates when clicked.
The reason for asking is I have a macro to auto save a file using a selected
cell range and current date as file name to a chosen location within a shared
drive.
The idea being to make it more user friendly for those not to keen on IT.
Can any one help please!!
--
Marco

Don Guillett

Attach macro to a cell
 
right click sheet tabview codeleft windowworksheetright window double
click

if target.address="$A$1" then call my macro

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marco" wrote in message
...
Can you attach a macro to a cell which when clicked activates the macro or
can you attach a macro to a button/shape inbedded in a form as before
activates when clicked.
The reason for asking is I have a macro to auto save a file using a
selected
cell range and current date as file name to a chosen location within a
shared
drive.
The idea being to make it more user friendly for those not to keen on IT.
Can any one help please!!
--
Marco



Marco

Attach macro to a cell
 
Thanks Don
But do i in the part ="$A$1" (put the cell loc i want to use to active the
macro)and in the part then call my macro (put the name of the macro to be
used in this case it is called SvMe

Marco


"Don Guillett" wrote:

right click sheet tabview codeleft windowworksheetright window double
click

if target.address="$A$1" then call my macro

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marco" wrote in message
...
Can you attach a macro to a cell which when clicked activates the macro or
can you attach a macro to a button/shape inbedded in a form as before
activates when clicked.
The reason for asking is I have a macro to auto save a file using a
selected
cell range and current date as file name to a chosen location within a
shared
drive.
The idea being to make it more user friendly for those not to keen on IT.
Can any one help please!!
--
Marco




Don Guillett

Attach macro to a cell
 
right click sheet tabview codecopy/paste thistest by double click on
cell a1


Private Sub Worksheet_BeforeDoubleClick(ByVal Target As Range, Cancel As
Boolean)
If Target.Address = "$A$1" Then Call mymacro
End Sub

Sub mymacro()
MsgBox "Hi there"
End Sub

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marco" wrote in message
...
Thanks Don
But do i in the part ="$A$1" (put the cell loc i want to use to active the
macro)and in the part then call my macro (put the name of the macro to be
used in this case it is called SvMe

Marco


"Don Guillett" wrote:

right click sheet tabview codeleft windowworksheetright window double
click

if target.address="$A$1" then call my macro

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"Marco" wrote in message
...
Can you attach a macro to a cell which when clicked activates the macro
or
can you attach a macro to a button/shape inbedded in a form as before
activates when clicked.
The reason for asking is I have a macro to auto save a file using a
selected
cell range and current date as file name to a chosen location within a
shared
drive.
The idea being to make it more user friendly for those not to keen on
IT.
Can any one help please!!
--
Marco





Gord Dibben

Attach macro to a cell
 
How often do you want to save the workbook?

At intervals without closing?

If not, may be better to place event code in Thisworkbook which does the saving
when you close the workbook.


Gord Dibben MS Excel MVP

On Tue, 30 Oct 2007 08:05:00 -0700, Marco
wrote:

Can you attach a macro to a cell which when clicked activates the macro or
can you attach a macro to a button/shape inbedded in a form as before
activates when clicked.
The reason for asking is I have a macro to auto save a file using a selected
cell range and current date as file name to a chosen location within a shared
drive.
The idea being to make it more user friendly for those not to keen on IT.
Can any one help please!!




All times are GMT +1. The time now is 02:22 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com