Walt,
I have been looking for an excel app to manage a directory
of 110 people with their pictures and contact info
would you be open to sharing your effort. I
would like to be able to publish it to a word or pdf file for people to download for reference and update when changes occur.
I have both XL 2003 and 2007
Walt wrote:
Picture compression in Excel 2007 - works in 2003
10-Feb-10
Hi
I have written an application to manage a club membership directory wit
member pictures. Many of the pictures were taken with digita
cameras and are megabytes in size. These must be compressed. Thi
works in Excel 2003 but does not in Excel 2007.Sub CompressPics(
Dim StrtSel As Rang
On Error GoTo CompressPicsERRO
Set StrtSel = Selectio
With ActiveShee
..Unprotec
..DrawingObjects.Select '<< The problem seem
to be here someho
CommandBars.FindControl(ID:=6382).Execut
StrtSel.Selec
..Protec
End Wit
Set StrtSel = Nothin
Exit Su
CompressPicsERROR
ActiveSheet.Protec
Set StrtSel = Nothin
MsgBox "ERROR in CompressPics Routine.
End Su
Any help will be appreciated
Walt
Previous Posts In This Thread:
Picture compression in Excel 2007 - works in 2003
Hi
I have written an application to manage a club membership directory wit
member pictures. Many of the pictures were taken with digita
cameras and are megabytes in size. These must be compressed. Thi
works in Excel 2003 but does not in Excel 2007.Sub CompressPics(
Dim StrtSel As Rang
On Error GoTo CompressPicsERRO
Set StrtSel = Selectio
With ActiveShee
..Unprotec
..DrawingObjects.Select '<< The problem seem
to be here someho
CommandBars.FindControl(ID:=6382).Execut
StrtSel.Selec
..Protec
End Wit
Set StrtSel = Nothin
Exit Su
CompressPicsERROR
ActiveSheet.Protec
Set StrtSel = Nothin
MsgBox "ERROR in CompressPics Routine.
End Su
Any help will be appreciated
Walt
Hi,Try this in xl2007.application.CommandBars.
Hi
Try this in xl2007
application.CommandBars.ExecuteMso "PicturesCompress
Cheer
And
On 11/02/2010 01:21, Walt wrote:
Hi Andy,Thanks, that works just fine in Excel 2007.
Hi Andy
Thanks, that works just fine in Excel 2007. I tried using th
following routine, but when testing back in Excel 2003, I get an Erro
message
Microsoft Visual Basi
Compile Error
Method or data member not foun
OK & Help button
it is been a long time since I used conditional compile. Thinkin
back to the compiler constants, that does not seem to be a way aroun
this. I hope to get 50+ copies of this application out to the clu
sub-units (Our Oregon unit has 100+ members to track). And
hopefully with the next release of Excel, those members with Macs wil
be able to use it too without a lot of gyration
Sub CompressPics(
Dim StrtSel As Rang
On Error GoTo CompressPicsERRO
Set StrtSel = Selectio
With ActiveShee
..Unprotec
If Application.Version < 12 The
..DrawingObjects.Selec
Application.CommandBars.FindControl(ID:=6382).Execut
Els
..Shapes.SelectAl
Application.CommandBars.ExecuteMso "PicturesCompress
'<< ExecuteMso highlighted on XL2003 compile erro
End I
StrtSel.Selec
..Protec
End Wit
Set StrtSel = Nothin
Exit Su
CompressPicsERROR
StrtSel.Selec
ActiveSheet.Protec
Set StrtSel = Nothin
MsgBox "ERROR in CompressPics Routine.
End Su
Thanks for the help
Walt
Try this modification when testing application version.If Val(Application.
Try this modification when testing application version
If Val(Application.Version) < 12 The
Cheer
And
On 11/02/2010 19:44, Walt wrote
-
Andy Pope, Microsoft MVP - Exce
http://www.andypope.info
Hi Andy,Well, that did not seem to make any difference, though I can see it
Hi Andy
Well, that did not seem to make any difference, though I can see it i
better syntax.
The root of the problem seems to be that for Excel 2003, I need
something that is not functional in Excel 2007 and in Excel 2007, and
I need something that did not exist in Excel 2003. So, even though I
differentiate by version, Excel 2003 just will not compile with the
mechanism for Excel 2007. If there were an appropriate conditional
compile constant, I could probably make this work, but there is not to
my knowledge.
I hate to run two versions of this, and maybe more when the next Mac
version of Excel is released, but I do not see a way around that. It
looks like that is what I will have to do. The club members have all
sorts of machines with all sorts of Excel versions.
it is interesting to note that in Excel 2007 both the older and the
newer compress picture dialog boxes can be displayed using
1) Application.CommandBars.FindControl(ID:=6382).Execute - for the
old, and
2) Application.CommandBars.ExecuteMso "PicturesCompress" - for the
new
Only the new actually works.
It sure would be nice if there were a Method to do picture
compression.
Walt
You will not get it to compile in xl2003 as you are using code that isnot
You will not get it to compile in xl2003 as you are using code that is
not recognised. Obviously newer versions can know about older versions,
so for compiling and least it is not a problem.
You can move the bits code version specific code in to separate routines
that you call from CompressPics routine. You will also need to set the
option to Compile on demand, vbe menu Tools > Options > General.
Cheers
Andy
On 13/02/2010 00:30, Walt wrote:
--
Andy Pope, Microsoft MVP - Excel
http://www.andypope.info
Hi Andy,THAT WORKS PERFECTLY -- THANK YOU!!
Hi Andy,
THAT WORKS PERFECTLY -- THANK YOU!!
I have tested with Excel versions 2002, 2003 & 2007.
Walt
Submitted via EggHeadCafe - Software Developer Portal of Choice
Break the Roles in SharePoint Lists
http://www.eggheadcafe.com/tutorial...7-42f2d9110d79/break-the-roles-in-sharep.aspx