Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Saving the spreadsheet only with no code? Selecting shapes too.

1.) Is there a way to save a file, but only save just the worksheet data
and not all of the VBA code?

I am currently testing some hardware and i save a new file for each new
serial no. Problem is, each excel file is like a half a MEG! Hoping to
make the filesize much smaller.

2.) I import a screenshot (.bmp) of the test equipment onto the
spreadsheet. But my code doesn't erase the last screenshot. So the images
keep getting layed down on top of one another. Need to select the image
and delete. I just cant figure out how to select it. Found some code on
the web, but it didn't seem to work. It's the only image so i can select
all.

thanks,
groundhog

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Saving the spreadsheet only with no code? Selecting shapes too.

Is the problem the file size or is it the code? If having the code embeded in
the sheet is not a big issue then it is a lot easier to just leave it (the
code will be very small). Otherwise you could put the code in an addin and
make yourself a toolbar button to remove the images (probably my favorite
option but it is a bit more work). Which direction do you want to go?
--
HTH...

Jim Thomlinson


"groundhog1" wrote:

1.) Is there a way to save a file, but only save just the worksheet data
and not all of the VBA code?

I am currently testing some hardware and i save a new file for each new
serial no. Problem is, each excel file is like a half a MEG! Hoping to
make the filesize much smaller.

2.) I import a screenshot (.bmp) of the test equipment onto the
spreadsheet. But my code doesn't erase the last screenshot. So the images
keep getting layed down on top of one another. Need to select the image
and delete. I just cant figure out how to select it. Found some code on
the web, but it didn't seem to work. It's the only image so i can select
all.

thanks,
groundhog


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 486
Default Saving the spreadsheet only with no code? Selecting shapes to

This code will remove all of the shapes

Sub RemoveAllPictures()
Dim shp As Shape

For Each shp In Shapes
shp.Delete
Next shp
End Sub
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Is the problem the file size or is it the code? If having the code embeded in
the sheet is not a big issue then it is a lot easier to just leave it (the
code will be very small). Otherwise you could put the code in an addin and
make yourself a toolbar button to remove the images (probably my favorite
option but it is a bit more work). Which direction do you want to go?
--
HTH...

Jim Thomlinson


"groundhog1" wrote:

1.) Is there a way to save a file, but only save just the worksheet data
and not all of the VBA code?

I am currently testing some hardware and i save a new file for each new
serial no. Problem is, each excel file is like a half a MEG! Hoping to
make the filesize much smaller.

2.) I import a screenshot (.bmp) of the test equipment onto the
spreadsheet. But my code doesn't erase the last screenshot. So the images
keep getting layed down on top of one another. Need to select the image
and delete. I just cant figure out how to select it. Found some code on
the web, but it didn't seem to work. It's the only image so i can select
all.

thanks,
groundhog


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Saving the spreadsheet only with no code? Selecting shapes to

Hi Jim

Don't use code like this
See why here
http://www.rondebruin.nl/controlsobjectsworksheet.htm


--
Regards Ron de Bruin
http://www.rondebruin.nl


"Jim Thomlinson" wrote in message
...
This code will remove all of the shapes

Sub RemoveAllPictures()
Dim shp As Shape

For Each shp In Shapes
shp.Delete
Next shp
End Sub
--
HTH...

Jim Thomlinson


"Jim Thomlinson" wrote:

Is the problem the file size or is it the code? If having the code embeded in
the sheet is not a big issue then it is a lot easier to just leave it (the
code will be very small). Otherwise you could put the code in an addin and
make yourself a toolbar button to remove the images (probably my favorite
option but it is a bit more work). Which direction do you want to go?
--
HTH...

Jim Thomlinson


"groundhog1" wrote:

1.) Is there a way to save a file, but only save just the worksheet data
and not all of the VBA code?

I am currently testing some hardware and i save a new file for each new
serial no. Problem is, each excel file is like a half a MEG! Hoping to
make the filesize much smaller.

2.) I import a screenshot (.bmp) of the test equipment onto the
spreadsheet. But my code doesn't erase the last screenshot. So the images
keep getting layed down on top of one another. Need to select the image
and delete. I just cant figure out how to select it. Found some code on
the web, but it didn't seem to work. It's the only image so i can select
all.

thanks,
groundhog




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
Selecting Multiple Shapes and Lines Nash Excel Discussion (Misc queries) 1 February 19th 10 11:42 PM
Selecting shapes with unknown names JBCI Excel Discussion (Misc queries) 0 March 10th 08 05:45 PM
Selecting shapes Daniel Bonallack Excel Discussion (Misc queries) 1 June 5th 07 04:57 PM
Saving the spreadsheet only with no code? Selecting shapes too. groundhog1 Excel Programming 4 February 21st 06 05:14 AM
Selecting drawing objects or shapes in a macro John DeFiore Excel Programming 3 October 13th 03 02:26 PM


All times are GMT +1. The time now is 01:18 AM.

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"