Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Image to appear on all worksheets if placed on 1 worksheet. POSSIBLE ?

Is it possible to place say a JPG or Logo onto say worksheet 1 and ALL the worksheets in that workbook, will ALSO have that image placed
in the same position as the image in worksheet 1?

I do not what it to be placed into the header though.
If so, how would I go about this?

Corey....
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Image to appear on all worksheets if placed on 1 worksheet. POSSIBLE ?

Or alternately is it possible to set up a macro that will prompt for a (jpg or gif) image on the PC, then after
selecting a image it is placed into a range of cells on a specific worksheet?

Is this possible?
How?

Corey....
"Corey" wrote in message ...
Is it possible to place say a JPG or Logo onto say worksheet 1 and ALL the worksheets in that workbook, will ALSO have that image placed
in the same position as the image in worksheet 1?

I do not what it to be placed into the header though.
If so, how would I go about this?

Corey....
  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Image to appear on all worksheets if placed on 1 worksheet. POSSIBLE ?

Hi Corey,

Try something like:

'=============
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim myPic As Picture
Const sAddress As String = "D1" '<<==== CHANGE
Const sStr As String = _
"C:\My Pictures\Excel.bmp" '<<==== CHANGE
Set WB = ThisWorkbook '<<==== CHANGE

For Each SH In WB.Worksheets
Set rng = SH.Range(sAddress)
Set myPic = SH.Pictures.Insert(sStr)
With myPic
.Top = rng.Top
.Left = rng.Left
End With
Next SH
End Sub
'<<=============


---
Regards,
Norman


"Corey" wrote in message
...
Is it possible to place say a JPG or Logo onto say worksheet 1 and ALL the
worksheets in that workbook, will ALSO have that image placed
in the same position as the image in worksheet 1?

I do not what it to be placed into the header though.
If so, how would I go about this?

Corey....


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Image to appear on all worksheets if placed on 1 worksheet. POSSIBLE ?

Thanks.
Norman, or anyone else.
Is the below code able to be enhanced with a PROMPT to manually choose the
image then it placed in the designated cell?

'=============
Public Sub Tester()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim myPic As Picture
Const sAddress As String = "A1"
Const sStr As String = _
"C:\My Pictures\Excel.bmp" '<<==== CHANGE to whatever
the result of the prompt is
Set WB = Activeworkbook
For Each SH In WB.Worksheets
Set rng = SH.Range(sAddress)
Set myPic = SH.Pictures.Insert(sStr)
With myPic
.Top = rng.Top
.Left = rng.Left
End With
Next SH
End Sub
'<<=============

Corey....
---
Regards,
Norman


"Corey" wrote in message
...
Is it possible to place say a JPG or Logo onto say worksheet 1 and ALL the
worksheets in that workbook, will ALSO have that image placed
in the same position as the image in worksheet 1?

I do not what it to be placed into the header though.
If so, how would I go about this?

Corey....



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Image to appear on all worksheets if placed on 1 worksheet. POSSIBLE ?

Hi Corey,

Norman, or anyone else.
Is the below code able to be enhanced with a PROMPT to manually choose the
image then it placed in the designated cell?


Try:
'=============
Public Sub Tester2()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim myPic As Picture
Dim res As Variant
Const sAddress As String = "D1" '<<==== CHANGE
Set WB = ThisWorkbook '<<==== CHANGE

res = Application.GetOpenFilename _
("Bitmap Files (*.bmp), *.bmp")
If res = False Then Exit Sub

For Each SH In WB.Worksheets
Set rng = SH.Range(sAddress)
Set myPic = SH.Pictures.Insert(res)
With myPic
.Top = rng.Top
.Left = rng.Left
End With
Next SH
End Sub
'<<=============

---
Regards,
Norman




  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 172
Default Image to appear on all worksheets if placed on 1 worksheet. POSSIBLE ?

Thank You again Norman,
You are a true gentleman.

Exactly as required.
Thanks

Corey....
"Norman Jones" wrote in message
...
Hi Corey,

Norman, or anyone else.
Is the below code able to be enhanced with a PROMPT to manually choose
the image then it placed in the designated cell?


Try:
'=============
Public Sub Tester2()
Dim WB As Workbook
Dim SH As Worksheet
Dim rng As Range
Dim myPic As Picture
Dim res As Variant
Const sAddress As String = "D1" '<<==== CHANGE
Set WB = ThisWorkbook '<<==== CHANGE

res = Application.GetOpenFilename _
("Bitmap Files (*.bmp), *.bmp")
If res = False Then Exit Sub

For Each SH In WB.Worksheets
Set rng = SH.Range(sAddress)
Set myPic = SH.Pictures.Insert(res)
With myPic
.Top = rng.Top
.Left = rng.Left
End With
Next SH
End Sub
'<<=============

---
Regards,
Norman




  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default Image to appear on all worksheets if placed on 1 worksheet. POSSIBLE ?

Hi Corey,

If you wish to enable the user to select bmp or jpg files, try changing:

res = Application.GetOpenFilename _
("Bitmap Files (*.bmp), *.bmp")


to

res = Application.GetOpenFilename _
("Image Files (*.bmp;*.jpg), *.bmp;*.jpg")

---
Regards,
Norman


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
Worksheet as an image Trainer Excel Discussion (Misc queries) 2 November 21st 08 05:44 PM
Hyperlink to an image in other worksheet, displaying entire image. twilliams Excel Worksheet Functions 0 February 7th 06 10:02 PM
How do I see a .ESP image (logo) that is inserted in a worksheet? SandiVH Excel Discussion (Misc queries) 1 November 12th 05 03:13 PM
How to add an image to a worksheet programmatically mjohnson Excel Discussion (Misc queries) 2 March 16th 05 04:48 PM
Export the worksheet background image as an image file - possible? DataFreakFromUtah Excel Programming 2 April 10th 04 04:49 PM


All times are GMT +1. The time now is 02:20 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"