#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default macro

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
--
thank you mac
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,939
Default macro

This should be close...

sub RemoveShapes
dim wks as worksheet
dim shp as shape

for each wks in worksheets
for each shp in wks.shapes
shp.Delete
next shp
next wks
end sub
--
HTH...

Jim Thomlinson


"mac" wrote:

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
--
thank you mac

  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default macro

Jim

Thank you for answering so quickly,. As you can tell I am new to macros.
When I copied this into the visual Basic. it comes up with an error (sub or
function not defined), Could you help with this. Again Thank you.

"Jim Thomlinson" wrote:

This should be close...

sub RemoveShapes
dim wks as worksheet
dim shp as shape

for each wks in worksheets
for each shp in wks.shapes
shp.Delete
next shp
next wks
end sub
--
HTH...

Jim Thomlinson


"mac" wrote:

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
--
thank you mac

  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 5,939
Default macro

Not too sure what the problem might be. It worksin mine... In the VBE select
Debug - Compile... Which line shows the error? Double check tools -
references to ensure that none of the references are tagged Missing:
--
HTH...

Jim Thomlinson


"mac" wrote:

Jim

Thank you for answering so quickly,. As you can tell I am new to macros.
When I copied this into the visual Basic. it comes up with an error (sub or
function not defined), Could you help with this. Again Thank you.

"Jim Thomlinson" wrote:

This should be close...

sub RemoveShapes
dim wks as worksheet
dim shp as shape

for each wks in worksheets
for each shp in wks.shapes
shp.Delete
next shp
next wks
end sub
--
HTH...

Jim Thomlinson


"mac" wrote:

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
--
thank you mac

  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,856
Default macro

Perhaps you only copied the bottom 6 lines of Jim's post, because there
is a blank line in the macro - there are three other lines above this,
starting with:

Sub RemoveShapes

Hope this helps.

Pete

Jim Thomlinson wrote:
Not too sure what the problem might be. It worksin mine... In the VBE select
Debug - Compile... Which line shows the error? Double check tools -
references to ensure that none of the references are tagged Missing:
--
HTH...

Jim Thomlinson


"mac" wrote:

Jim

Thank you for answering so quickly,. As you can tell I am new to macros.
When I copied this into the visual Basic. it comes up with an error (sub or
function not defined), Could you help with this. Again Thank you.

"Jim Thomlinson" wrote:

This should be close...

sub RemoveShapes
dim wks as worksheet
dim shp as shape

for each wks in worksheets
for each shp in wks.shapes
shp.Delete
next shp
next wks
end sub
--
HTH...

Jim Thomlinson


"mac" wrote:

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
--
thank you mac




  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default macro

Jim
THANK YOU IT WORKS!!!!!!!
--
thank you mac


"Jim Thomlinson" wrote:

Not too sure what the problem might be. It worksin mine... In the VBE select
Debug - Compile... Which line shows the error? Double check tools -
references to ensure that none of the references are tagged Missing:
--
HTH...

Jim Thomlinson


"mac" wrote:

Jim

Thank you for answering so quickly,. As you can tell I am new to macros.
When I copied this into the visual Basic. it comes up with an error (sub or
function not defined), Could you help with this. Again Thank you.

"Jim Thomlinson" wrote:

This should be close...

sub RemoveShapes
dim wks as worksheet
dim shp as shape

for each wks in worksheets
for each shp in wks.shapes
shp.Delete
next shp
next wks
end sub
--
HTH...

Jim Thomlinson


"mac" wrote:

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
--
thank you mac

  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Mac Mac is offline
external usenet poster
 
Posts: 213
Default macro

Hi Jim
I know you helped me with this macro. I came across a problem and was
wondering if you could help me again. When I run this macro it also removes
text boxes, which I don't want to do. Is there anyway I can fix it so that
it does not remove the text boxes. I appreciate any help you can give me.
Thank you.

--
thank you mac


"mac" wrote:

I would like to create a macro that when it opened the workbook, it would
remove all pictures (which are tickmarks). Is there a way to do this or do I
have to do it manually. Any help will be greatly appreciated. Thank You.
--
thank you mac

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
error when running cut & paste macro Otto Moehrbach Excel Worksheet Functions 4 August 9th 06 01:49 PM
Compiling macro based on cell values simonsmith Excel Discussion (Misc queries) 1 May 16th 06 08:31 PM
Search, Copy, Paste Macro in Excel [email protected] Excel Worksheet Functions 0 January 3rd 06 06:51 PM
Closing File Error jcliquidtension Excel Discussion (Misc queries) 4 October 20th 05 12:22 PM
Highlight Range - wrong macro, please edit. Danny Excel Worksheet Functions 8 October 19th 05 11:11 PM


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