Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default ActiveSheet.Pictures.Insert problem in excel 2007

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
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default ActiveSheet.Pictures.Insert problem in excel 2007

Try this:

Sub InsertAndMovePicture(sPicturePathAndFilename As String, sCellAddress As
String)
With ActiveSheet.Pictures.Insert(sPicturePathAndFilenam e)
.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" wrote in message
...
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



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default ActiveSheet.Pictures.Insert problem in excel 2007

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(sPicturePathAndFilenam e)
.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" wrote in message
...
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




  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default ActiveSheet.Pictures.Insert problem in excel 2007

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" wrote in message
...
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(sPicturePathAndFilenam e)
.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" wrote in message
...
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






  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default ActiveSheet.Pictures.Insert problem in excel 2007

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" wrote in message
...
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(sPicturePathAndFilenam e)
.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" wrote in message
...
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








  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 6,582
Default ActiveSheet.Pictures.Insert problem in excel 2007

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" wrote in message
...
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" wrote in message
...
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(sPicturePathAndFilenam e)
.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" wrote in message
...
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








  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 71
Default ActiveSheet.Pictures.Insert problem in excel 2007

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" wrote in message
...
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" wrote in message
...
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(sPicturePathAndFilenam e)
.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" wrote in message
...
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
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
Pictures.Insert not working correctly in excel 2008. Shashi Excel Programming 1 November 20th 07 05:50 PM
problem inserting pictures in excel 2007 using macro. dickiebird Excel Programming 1 July 26th 07 12:03 AM
ActiveSheet.Pictures.Insert Sean McPoland Excel Programming 0 January 29th 07 09:37 AM
How do I insert pictures in excel with the correct aspect ratio? dfb&mkp Excel Discussion (Misc queries) 0 February 12th 06 06:09 AM
Activesheet.Pictures.Insert dchow Excel Programming 2 September 24th 03 07:22 PM


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

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"