Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 199
Default Help with Excel macro

I have an Excel macro which is designed to minimise and then save the
open/active spreadsheet:


Application.WindowState = xlMinimized

ActiveWorkbook.Save


However, when it operates on one particular spreadsheet - "my work.xls" -
between the minimising and saving I would like it to run another macro
called "alter format". Assuming this is possible, can someone help me with
the code to achieve this please?


Many thanks

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Help with Excel macro


Victor Delta;451989 Wrote:
I have an Excel macro which is designed to minimise and then save the
open/active spreadsheet:


Application.WindowState = xlMinimized

ActiveWorkbook.Save


However, when it operates on one particular spreadsheet - "my work.xls"
-
between the minimising and saving I would like it to run another macro
called "alter format". Assuming this is possible, can someone help me
with
the code to achieve this please?


Many thanks


It's unlikely that a macro could be called "alter format", but assuming
it's called "AlterFormat" then this should do it:
Application.WindowState = xlMinimized
AlterFormat
ActiveWorkbook.Save


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=125108

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 199
Default Help with Excel macro

"p45cal" wrote in message
...

Victor Delta;451989 Wrote:
I have an Excel macro which is designed to minimise and then save the
open/active spreadsheet:


Application.WindowState = xlMinimized

ActiveWorkbook.Save


However, when it operates on one particular spreadsheet - "my work.xls"
-
between the minimising and saving I would like it to run another macro
called "alter format". Assuming this is possible, can someone help me
with
the code to achieve this please?


Many thanks


It's unlikely that a macro could be called "alter format", but assuming
it's called "AlterFormat" then this should do it:
Application.WindowState = xlMinimized
AlterFormat
ActiveWorkbook.Save


Thanks. Yes, you're right, I should have put "alter_format".

However, I only want to run the macro on one spreadsheet and so assumed some
sort of if statement would be required...? Is this not the case?

V

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1
Default Help with Excel macro


Victor Delta;452235 Wrote:
"p45cal" wrote in message
...

Victor Delta;451989 Wrote:
I have an Excel macro which is designed to minimise and then save

the
open/active spreadsheet:


Application.WindowState = xlMinimized

ActiveWorkbook.Save


However, when it operates on one particular spreadsheet - "my

work.xls"
-
between the minimising and saving I would like it to run another

macro
called "alter format". Assuming this is possible, can someone help

me
with
the code to achieve this please?


Many thanks


It's unlikely that a macro could be called "alter format", but

assuming
it's called "AlterFormat" then this should do it:
Application.WindowState = xlMinimized
AlterFormat
ActiveWorkbook.Save


Thanks. Yes, you're right, I should have put "alter_format".

However, I only want to run the macro on one spreadsheet and so assumed
some
sort of if statement would be required...? Is this not the case?

V


Gotcha.
Application.WindowState = xlMinimized
If ActiveWorkbook.Name = "my work.xls" Then AlterFormat
ActiveWorkbook.Save


--
p45cal

*p45cal*
------------------------------------------------------------------------
p45cal's Profile: http://www.thecodecage.com/forumz/member.php?userid=558
View this thread: http://www.thecodecage.com/forumz/sh...d.php?t=125108

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 199
Default Help with Excel macro

"p45cal" wrote in message
...

Victor Delta;452235 Wrote:
"p45cal" wrote in message
...

Victor Delta;451989 Wrote:
I have an Excel macro which is designed to minimise and then save

the
open/active spreadsheet:


Application.WindowState = xlMinimized

ActiveWorkbook.Save


However, when it operates on one particular spreadsheet - "my

work.xls"
-
between the minimising and saving I would like it to run another

macro
called "alter format". Assuming this is possible, can someone help

me
with
the code to achieve this please?


Many thanks

It's unlikely that a macro could be called "alter format", but

assuming
it's called "AlterFormat" then this should do it:
Application.WindowState = xlMinimized
AlterFormat
ActiveWorkbook.Save


Thanks. Yes, you're right, I should have put "alter_format".

However, I only want to run the macro on one spreadsheet and so assumed
some
sort of if statement would be required...? Is this not the case?

V


Gotcha.
Application.WindowState = xlMinimized
If ActiveWorkbook.Name = "my work.xls" Then AlterFormat
ActiveWorkbook.Save


Many thanks. No "Run" required then?

V

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
Macro Help Needed - Excel 2007 - Print Macro with Auto Sort Gavin Excel Worksheet Functions 0 May 17th 07 01:20 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 1 February 5th 07 09:31 PM
My excel macro recorder no longer shows up when recording macro jack Excel Discussion (Misc queries) 3 February 5th 07 08:22 PM
passing arguments from an excel macro to a word macro KWE39 Excel Discussion (Misc queries) 1 July 7th 05 03:56 PM


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