PC Review


Reply
Thread Tools Rate Thread

ActiveSheet.Pictures.Insert problem in excel 2007

 
 
Marvin
Guest
Posts: n/a
 
      16th Feb 2008
The following macro worked fine for years in 2003..
Range("E16").Select
' Get Client / Summary Menu CMA Picture

ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select

In 2007 it places the picture in B4 consistently even if I use a range
command for another location
 
Reply With Quote
 
 
 
 
Jon Peltier
Guest
Posts: n/a
 
      16th Feb 2008
Try this:

Sub InsertAndMovePicture(sPicturePathAndFilename As String, sCellAddress As
String)
With ActiveSheet.Pictures.Insert(sPicturePathAndFilename)
.Left = ActiveSheet.Range(sCellAddress).Left
.Top = ActiveSheet.Range(sCellAddress).Top
End With
End Sub

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Marvin" <(E-Mail Removed)> wrote in message
news:F0196413-2C57-4B3F-8A5B-(E-Mail Removed)...
> The following macro worked fine for years in 2003..
> Range("E16").Select
> ' Get Client / Summary Menu CMA Picture
>
> ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select
>
> In 2007 it places the picture in B4 consistently even if I use a range
> command for another location



 
Reply With Quote
 
Marvin
Guest
Posts: n/a
 
      23rd Feb 2008
Would you know if Microsoft is planning on fixing this issue in a patch?

"Jon Peltier" wrote:

> Try this:
>
> Sub InsertAndMovePicture(sPicturePathAndFilename As String, sCellAddress As
> String)
> With ActiveSheet.Pictures.Insert(sPicturePathAndFilename)
> .Left = ActiveSheet.Range(sCellAddress).Left
> .Top = ActiveSheet.Range(sCellAddress).Top
> End With
> End Sub
>
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> Tutorials and Custom Solutions
> Peltier Technical Services, Inc. - http://PeltierTech.com
> _______
>
>
> "Marvin" <(E-Mail Removed)> wrote in message
> news:F0196413-2C57-4B3F-8A5B-(E-Mail Removed)...
> > The following macro worked fine for years in 2003..
> > Range("E16").Select
> > ' Get Client / Summary Menu CMA Picture
> >
> > ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select
> >
> > In 2007 it places the picture in B4 consistently even if I use a range
> > command for another location

>
>
>

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      24th Feb 2008
This is so minor compared to other issues, I would not expect it to be
addressed.

- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Marvin" <(E-Mail Removed)> wrote in message
news:694F1916-3CD3-4FFA-8D4D-(E-Mail Removed)...
> Would you know if Microsoft is planning on fixing this issue in a patch?
>
> "Jon Peltier" wrote:
>
>> Try this:
>>
>> Sub InsertAndMovePicture(sPicturePathAndFilename As String, sCellAddress
>> As
>> String)
>> With ActiveSheet.Pictures.Insert(sPicturePathAndFilename)
>> .Left = ActiveSheet.Range(sCellAddress).Left
>> .Top = ActiveSheet.Range(sCellAddress).Top
>> End With
>> End Sub
>>
>> - Jon
>> -------
>> Jon Peltier, Microsoft Excel MVP
>> Tutorials and Custom Solutions
>> Peltier Technical Services, Inc. - http://PeltierTech.com
>> _______
>>
>>
>> "Marvin" <(E-Mail Removed)> wrote in message
>> news:F0196413-2C57-4B3F-8A5B-(E-Mail Removed)...
>> > The following macro worked fine for years in 2003..
>> > Range("E16").Select
>> > ' Get Client / Summary Menu CMA Picture
>> >
>> > ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select
>> >
>> > In 2007 it places the picture in B4 consistently even if I use a range
>> > command for another location

>>
>>
>>



 
Reply With Quote
 
Marvin
Guest
Posts: n/a
 
      26th Feb 2008
Jon, I have multiple named pictures on the page and they end up piled
together. Is there a way to adjust each picture by name?

"Jon Peltier" wrote:

> This is so minor compared to other issues, I would not expect it to be
> addressed.
>
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> Tutorials and Custom Solutions
> Peltier Technical Services, Inc. - http://PeltierTech.com
> _______
>
>
> "Marvin" <(E-Mail Removed)> wrote in message
> news:694F1916-3CD3-4FFA-8D4D-(E-Mail Removed)...
> > Would you know if Microsoft is planning on fixing this issue in a patch?
> >
> > "Jon Peltier" wrote:
> >
> >> Try this:
> >>
> >> Sub InsertAndMovePicture(sPicturePathAndFilename As String, sCellAddress
> >> As
> >> String)
> >> With ActiveSheet.Pictures.Insert(sPicturePathAndFilename)
> >> .Left = ActiveSheet.Range(sCellAddress).Left
> >> .Top = ActiveSheet.Range(sCellAddress).Top
> >> End With
> >> End Sub
> >>
> >> - Jon
> >> -------
> >> Jon Peltier, Microsoft Excel MVP
> >> Tutorials and Custom Solutions
> >> Peltier Technical Services, Inc. - http://PeltierTech.com
> >> _______
> >>
> >>
> >> "Marvin" <(E-Mail Removed)> wrote in message
> >> news:F0196413-2C57-4B3F-8A5B-(E-Mail Removed)...
> >> > The following macro worked fine for years in 2003..
> >> > Range("E16").Select
> >> > ' Get Client / Summary Menu CMA Picture
> >> >
> >> > ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select
> >> >
> >> > In 2007 it places the picture in B4 consistently even if I use a range
> >> > command for another location
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
Jon Peltier
Guest
Posts: n/a
 
      27th Feb 2008
Sub InsertAndMovePicture(sPictureName As String, sCellAddress As String)
With ActiveSheet.Pictures(sPictureName)
.Left = ActiveSheet.Range(sCellAddress).Left
.Top = ActiveSheet.Range(sCellAddress).Top
End With
End Sub


- Jon
-------
Jon Peltier, Microsoft Excel MVP
Tutorials and Custom Solutions
Peltier Technical Services, Inc. - http://PeltierTech.com
_______


"Marvin" <(E-Mail Removed)> wrote in message
news:F7FF2C6A-1DA3-4FE0-A0D1-(E-Mail Removed)...
> Jon, I have multiple named pictures on the page and they end up piled
> together. Is there a way to adjust each picture by name?
>
> "Jon Peltier" wrote:
>
>> This is so minor compared to other issues, I would not expect it to be
>> addressed.
>>
>> - Jon
>> -------
>> Jon Peltier, Microsoft Excel MVP
>> Tutorials and Custom Solutions
>> Peltier Technical Services, Inc. - http://PeltierTech.com
>> _______
>>
>>
>> "Marvin" <(E-Mail Removed)> wrote in message
>> news:694F1916-3CD3-4FFA-8D4D-(E-Mail Removed)...
>> > Would you know if Microsoft is planning on fixing this issue in a
>> > patch?
>> >
>> > "Jon Peltier" wrote:
>> >
>> >> Try this:
>> >>
>> >> Sub InsertAndMovePicture(sPicturePathAndFilename As String,
>> >> sCellAddress
>> >> As
>> >> String)
>> >> With ActiveSheet.Pictures.Insert(sPicturePathAndFilename)
>> >> .Left = ActiveSheet.Range(sCellAddress).Left
>> >> .Top = ActiveSheet.Range(sCellAddress).Top
>> >> End With
>> >> End Sub
>> >>
>> >> - Jon
>> >> -------
>> >> Jon Peltier, Microsoft Excel MVP
>> >> Tutorials and Custom Solutions
>> >> Peltier Technical Services, Inc. - http://PeltierTech.com
>> >> _______
>> >>
>> >>
>> >> "Marvin" <(E-Mail Removed)> wrote in message
>> >> news:F0196413-2C57-4B3F-8A5B-(E-Mail Removed)...
>> >> > The following macro worked fine for years in 2003..
>> >> > Range("E16").Select
>> >> > ' Get Client / Summary Menu CMA Picture
>> >> >
>> >> > ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select
>> >> >
>> >> > In 2007 it places the picture in B4 consistently even if I use a
>> >> > range
>> >> > command for another location
>> >>
>> >>
>> >>

>>
>>
>>



 
Reply With Quote
 
Marvin
Guest
Posts: n/a
 
      27th Feb 2008
This works Great! Thanks

Sub InsertAndMovePicture(sPictureName As String, sCellAddress As String)
'InsertAndMovePicture Macro Written by
'Jon Peltier, Microsoft Excel MVP
'Tutorials and Custom Solutions
'Peltier Technical Services, Inc. - http://PeltierTech.com
'02/25/08
'
With ActiveSheet.Pictures(sPictureName)
.Left = ActiveSheet.Range(sCellAddress).Left
.Top = ActiveSheet.Range(sCellAddress).Top
End With
End Sub
Sub CallMovePicture()

ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select
Selection.Name = "Picture-1"
Application.Run "InsertAndMovePicture", "Picture-1", "A1"
End Sub


"Jon Peltier" wrote:

> Sub InsertAndMovePicture(sPictureName As String, sCellAddress As String)
> With ActiveSheet.Pictures(sPictureName)
> .Left = ActiveSheet.Range(sCellAddress).Left
> .Top = ActiveSheet.Range(sCellAddress).Top
> End With
> End Sub
>
>
> - Jon
> -------
> Jon Peltier, Microsoft Excel MVP
> Tutorials and Custom Solutions
> Peltier Technical Services, Inc. - http://PeltierTech.com
> _______
>
>
> "Marvin" <(E-Mail Removed)> wrote in message
> news:F7FF2C6A-1DA3-4FE0-A0D1-(E-Mail Removed)...
> > Jon, I have multiple named pictures on the page and they end up piled
> > together. Is there a way to adjust each picture by name?
> >
> > "Jon Peltier" wrote:
> >
> >> This is so minor compared to other issues, I would not expect it to be
> >> addressed.
> >>
> >> - Jon
> >> -------
> >> Jon Peltier, Microsoft Excel MVP
> >> Tutorials and Custom Solutions
> >> Peltier Technical Services, Inc. - http://PeltierTech.com
> >> _______
> >>
> >>
> >> "Marvin" <(E-Mail Removed)> wrote in message
> >> news:694F1916-3CD3-4FFA-8D4D-(E-Mail Removed)...
> >> > Would you know if Microsoft is planning on fixing this issue in a
> >> > patch?
> >> >
> >> > "Jon Peltier" wrote:
> >> >
> >> >> Try this:
> >> >>
> >> >> Sub InsertAndMovePicture(sPicturePathAndFilename As String,
> >> >> sCellAddress
> >> >> As
> >> >> String)
> >> >> With ActiveSheet.Pictures.Insert(sPicturePathAndFilename)
> >> >> .Left = ActiveSheet.Range(sCellAddress).Left
> >> >> .Top = ActiveSheet.Range(sCellAddress).Top
> >> >> End With
> >> >> End Sub
> >> >>
> >> >> - Jon
> >> >> -------
> >> >> Jon Peltier, Microsoft Excel MVP
> >> >> Tutorials and Custom Solutions
> >> >> Peltier Technical Services, Inc. - http://PeltierTech.com
> >> >> _______
> >> >>
> >> >>
> >> >> "Marvin" <(E-Mail Removed)> wrote in message
> >> >> news:F0196413-2C57-4B3F-8A5B-(E-Mail Removed)...
> >> >> > The following macro worked fine for years in 2003..
> >> >> > Range("E16").Select
> >> >> > ' Get Client / Summary Menu CMA Picture
> >> >> >
> >> >> > ActiveSheet.Pictures.Insert("C:\CRISNET\EXPORT\CMA_Picture_Group\CMA_Picture.jpg").Select
> >> >> >
> >> >> > In 2007 it places the picture in B4 consistently even if I use a
> >> >> > range
> >> >> > command for another location
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>

>
>
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Pictures.Insert not working in Excel 2007 Manfred Microsoft Excel Programming 3 19th Sep 2008 02:56 PM
Excel 2007 - Insert Picture Bug - Locks Up Excel and CSRSS.EXE to100% - Problem on 7 Computers JohnCollyer Microsoft Excel Discussion 5 29th Jan 2008 07:30 PM
problem inserting pictures in excel 2007 using macro. =?Utf-8?B?ZGlja2llYmlyZA==?= Microsoft Excel Programming 1 26th Jul 2007 12:03 AM
ActiveSheet.Pictures.Insert =?Utf-8?B?U2VhbiBNY1BvbGFuZA==?= Microsoft Excel Programming 0 29th Jan 2007 09:37 AM
Activesheet.Pictures.Insert dchow Microsoft Excel Programming 2 24th Sep 2003 07:22 PM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:58 PM.