Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
vj5 vj5 is offline
external usenet poster
 
Posts: 22
Default insert image

hi experts,
how to insert image from resource file.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default insert image

Hi VJ,

Try something like:

'=============
Public Sub Tester()
Dim myPath As String
Dim MyImage As String

my Path = "C:\Documents and Settings\VJS\" _
& "My Documents\My
Pictures\"
MyImage = "YourImage Name.jpg"

ActiveSheet.Pictures.Insert (myPath & MyImage)

End Sub
'<<=============


---
Regards,
Norman


"vj5" wrote in message
...
hi experts,
how to insert image from resource file.



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default insert image

Whilst you can certainly use the API to LoadLibrary/LoadBitmap etc in VBA,
none of Excel's objects (natively) expose handles or DCs, so I can't see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.



  #4   Report Post  
Posted to microsoft.public.excel.programming
vj5 vj5 is offline
external usenet poster
 
Posts: 22
Default insert image

hi experts
thanks for reply
my problem is that i can't save image in a file and can't give path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?



"Norman Jones" wrote:

Hi VJ,

Try something like:

'=============
Public Sub Tester()
Dim myPath As String
Dim MyImage As String

my Path = "C:\Documents and Settings\VJS\" _
& "My Documents\My
Pictures\"
MyImage = "YourImage Name.jpg"

ActiveSheet.Pictures.Insert (myPath & MyImage)

End Sub
'<<=============


---
Regards,
Norman


"vj5" wrote in message
...
hi experts,
how to insert image from resource file.




  #5   Report Post  
Posted to microsoft.public.excel.programming
vj5 vj5 is offline
external usenet poster
 
Posts: 22
Default insert image

thanks for reply
my problem is that i can't save image in a file and can't give path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?


"NickHK" wrote:

Whilst you can certainly use the API to LoadLibrary/LoadBitmap etc in VBA,
none of Excel's objects (natively) expose handles or DCs, so I can't see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.






  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default insert image

Take it from the resource file, save to file, insert, delete the file.

Why can't you save to file temporarily ?

NickHK

"vj5" wrote in message
...
thanks for reply
my problem is that i can't save image in a file and can't give path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?


"NickHK" wrote:

Whilst you can certainly use the API to LoadLibrary/LoadBitmap etc in

VBA,
none of Excel's objects (natively) expose handles or DCs, so I can't see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.






  #7   Report Post  
Posted to microsoft.public.excel.programming
vj5 vj5 is offline
external usenet poster
 
Posts: 22
Default insert image

if user don't have save permission than it will fails thats why i can't
save it on machine.


"NickHK" wrote:

Take it from the resource file, save to file, insert, delete the file.

Why can't you save to file temporarily ?

NickHK

"vj5" wrote in message
...
thanks for reply
my problem is that i can't save image in a file and can't give path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?


"NickHK" wrote:

Whilst you can certainly use the API to LoadLibrary/LoadBitmap etc in

VBA,
none of Excel's objects (natively) expose handles or DCs, so I can't see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.






  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default insert image

You can always save it to
C:\Documents and Settings\<Current User\Application Data\<Your Company\
Or the Temp folder.
You must be able to save it somewhere.

NickHK

"vj5" wrote in message
...
if user don't have save permission than it will fails thats why i can't
save it on machine.


"NickHK" wrote:

Take it from the resource file, save to file, insert, delete the file.

Why can't you save to file temporarily ?

NickHK

"vj5" wrote in message
...
thanks for reply
my problem is that i can't save image in a file and can't give path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?


"NickHK" wrote:

Whilst you can certainly use the API to LoadLibrary/LoadBitmap etc

in
VBA,
none of Excel's objects (natively) expose handles or DCs, so I can't

see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.








  #9   Report Post  
Posted to microsoft.public.excel.programming
vj5 vj5 is offline
external usenet poster
 
Posts: 22
Default insert image

but i note have permission to save anything on machine


"NickHK" wrote:

You can always save it to
C:\Documents and Settings\<Current User\Application Data\<Your Company\
Or the Temp folder.
You must be able to save it somewhere.

NickHK

"vj5" wrote in message
...
if user don't have save permission than it will fails thats why i can't
save it on machine.


"NickHK" wrote:

Take it from the resource file, save to file, insert, delete the file.

Why can't you save to file temporarily ?

NickHK

"vj5" wrote in message
...
thanks for reply
my problem is that i can't save image in a file and can't give path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?


"NickHK" wrote:

Whilst you can certainly use the API to LoadLibrary/LoadBitmap etc

in
VBA,
none of Excel's objects (natively) expose handles or DCs, so I can't

see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.









  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4,391
Default insert image

How are the temp files created that are required for Excel to run ?
So Excel cannot save any of the changes that its users make either ?

Pretty useless system then.

NickHK

"vj5" wrote in message
...
but i note have permission to save anything on machine


"NickHK" wrote:

You can always save it to
C:\Documents and Settings\<Current User\Application Data\<Your

Company\
Or the Temp folder.
You must be able to save it somewhere.

NickHK

"vj5" wrote in message
...
if user don't have save permission than it will fails thats why i

can't
save it on machine.


"NickHK" wrote:

Take it from the resource file, save to file, insert, delete the

file.

Why can't you save to file temporarily ?

NickHK

"vj5" wrote in message
...
thanks for reply
my problem is that i can't save image in a file and can't give

path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?


"NickHK" wrote:

Whilst you can certainly use the API to LoadLibrary/LoadBitmap

etc
in
VBA,
none of Excel's objects (natively) expose handles or DCs, so I

can't
see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.













  #11   Report Post  
Posted to microsoft.public.excel.programming
vj5 vj5 is offline
external usenet poster
 
Posts: 22
Default insert image

that i don't know but i can't save file on local machine.
is there any possibility to do the same?

"NickHK" wrote:

How are the temp files created that are required for Excel to run ?
So Excel cannot save any of the changes that its users make either ?

Pretty useless system then.

NickHK

"vj5" wrote in message
...
but i note have permission to save anything on machine


"NickHK" wrote:

You can always save it to
C:\Documents and Settings\<Current User\Application Data\<Your

Company\
Or the Temp folder.
You must be able to save it somewhere.

NickHK

"vj5" wrote in message
...
if user don't have save permission than it will fails thats why i

can't
save it on machine.


"NickHK" wrote:

Take it from the resource file, save to file, insert, delete the

file.

Why can't you save to file temporarily ?

NickHK

"vj5" wrote in message
...
thanks for reply
my problem is that i can't save image in a file and can't give

path of
image file.
i have to take image from resource file only.
is there ANY possibility to do the same?


"NickHK" wrote:

Whilst you can certainly use the API to LoadLibrary/LoadBitmap

etc
in
VBA,
none of Excel's objects (natively) expose handles or DCs, so I

can't
see
what you would do with results.
Save the pic to file, insert, then delete ?

NickHK

"vj5" wrote in message
...
hi experts,
how to insert image from resource file.












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
insert an image based on a cell value brig239 New Users to Excel 1 June 3rd 09 07:10 PM
insert image to the cells kang New Users to Excel 2 August 14th 07 12:36 PM
conditionally insert image M John Excel Programming 7 May 5th 06 01:47 PM
how do I insert image in a comment? t23augusto Excel Discussion (Misc queries) 1 July 31st 05 12:30 AM
Insert Image on a form Tempy Excel Programming 2 June 3rd 05 05:45 AM


All times are GMT +1. The time now is 12:18 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"