Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Userform Picture Change


I have created a userform for entering my address details.

What i would like is the picture on the userform to be different each
time i open up the programme. I can not find the Excel VBA macro code
to do this.

Is it also possible to make it so that it can open on any machine?


--
Shake
------------------------------------------------------------------------
Shake's Profile: http://www.excelforum.com/member.php...o&userid=28577
View this thread: http://www.excelforum.com/showthread...hreadid=482414

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Userform Picture Change


Hello Shake,

The following code will load a picture of your choice as the background
for the user form. I have never seen any documentation on this function.
So, I am not suprised you haven't found any. You can set PicPath to the
picture you want. I just used what came loaded onto my machine (Office
2000).

*Load a Picture as the Object Background:* 'Change Picture

Code:
--------------------

PicPath = "C:\Documents and Settings\All Users\Documents\My Pictures\Sample Pictures\Sunset.jpg"
UserForm1.Picture = StdFunctions.LoadPicture(PicPath)

--------------------

Sincerely,
Leith Ross


--
Leith Ross
------------------------------------------------------------------------
Leith Ross's Profile: http://www.excelforum.com/member.php...o&userid=18465
View this thread: http://www.excelforum.com/showthread...hreadid=482414

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto Userform Picture Change


Thanks for that! That works fine

I'll try toadapt it so that i can open differant pictures with maybe a
random number routine, say between 1 and 10. So that i can get files
that are named i.e. 1.jpg, 3.jpg


--
Shake
------------------------------------------------------------------------
Shake's Profile: http://www.excelforum.com/member.php...o&userid=28577
View this thread: http://www.excelforum.com/showthread...hreadid=482414

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
Picture in a UserForm Howard31 Excel Discussion (Misc queries) 1 December 20th 08 03:27 PM
Usin Picture on userform Momo Excel Programming 3 March 4th 05 04:15 PM
Programatically changing picture in UserForm - VBA - Mac OSX dirk Excel Programming 2 May 14th 04 12:40 PM
displaying picture in a userform Todd Huttenstine[_3_] Excel Programming 1 January 28th 04 02:42 AM
userform image from picture in worksheet Doug Glancy[_5_] Excel Programming 2 November 10th 03 04:43 AM


All times are GMT +1. The time now is 02:57 AM.

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"