ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Saving the spreadsheet only with no code? Selecting shapes too. (https://www.excelbanter.com/excel-programming/353851-saving-spreadsheet-only-no-code-selecting-shapes-too.html)

groundhog1

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


Jim Thomlinson[_5_]

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



Jim Thomlinson[_5_]

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



Ron de Bruin

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






All times are GMT +1. The time now is 09:44 AM.

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