Tecnologia, programação e muito Visual FoxPro.

quarta-feira, 1 de setembro de 2010

Re: ]] XL-mania [[ membuat worksheet yg beserta gambar

 

bisa dengan module bikinan Mbak Siti,

 

Function lihat(lokasi As String) As Boolean

'Mengganti dengan gambar yang baru

Dim AC As Range

Static X As Shape

On Error GoTo Done

Set AC = Application.Caller

If bolehlihat(X) Then

X.Delete

Else

'Lihat gambar yang ada

For Each X In ActiveSheet.Shapes

    If X.Type = msoLinkedPicture Then

        If X.Left >= AC.Left And X.Left < AC.Left + AC.Width Then

            If X.Top >= AC.Top And X.Top < AC.Top + AC.Height Then

                X.Delete

                Exit For

            End If

        End If

    End If

Next X

End If

Set X = ActiveSheet.Shapes.AddPicture(lokasi, True, True, AC.Left, AC.Top, 105, 120)

lihat = True

Exit Function

Done:

lihat = False

End Function

 

Function bolehlihat(X As Shape) As Boolean

'Menghasilkan True apabila gambarnya ada

Dim Gambar As String

On Error GoTo GambarTidakAda

If X Is Nothing Then GoTo GambarTidakAda

Gambar = X.Name

bolehlihat = True

GambarTidakAda:

bolehlihat = False

End Function

 

terus dipanggil lewat fungsi :

=IF(lihat("D:/gambar/"&VLOOKUP($S$1,'DATA BASE'!$A$1:$F$29,6,0))=FALSE,lihat("D:/gambar/belumada.png"),lihat("D:/gambar/"&VLOOKUP($S$1,'DATA BASE'!$A$1:$F$29,6,0)))

 

terlampir attachment,

taroh folder gambar di D:/

 

sekian mudah2an membantu.

 

 

Edi

--- On Wed, 1/9/10, dedy puryaone <purya.one@gmail.com> wrote:


From: dedy puryaone <purya.one@gmail.com>
Subject: ]] XL-mania [[ membuat worksheet yg beserta gambar
To: "XL Mania" <XL-mania@yahoogroups.com>
Date: Wednesday, 1 September, 2010, 1:31 PM

 
dear moderator......

gw pingin input gambar dlm worksheet. dalam worksheet itu ada data-data yang lain, n itu udah beres. nah tinggal bagaimana cara agar gambar itu bs kita munculin dlm worksheet tsb?contoh data terlampir.

thanks before.

__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| oooppsss... 216 e-mails di folder sp4m kepencet [delete] :(       |
| http://www.facebook.com/group.php?gid=37671048001&ref=mf          |
+-------------------------------------------------------------------+
| DILARANG : MLM, money game, OOT, iklan tanpa izin, SARA, testing, |
| pembicaraan pribadi, one line message,  melecehkan,  tidak sopan. |
+-------------------------------------------------------------------+
| Buat subjek yang kreatif, jangan : "tanya", "help", "mohon bantu" |
| Usahakan besar attachment < 200 kb. Gunakan  winzip  jika  perlu. |
+-------------------------------------------------------------------+
| Ajak teman-teman Anda bergabung dengan mengirim e-mail kosong ke  |
| XL-mania-subscribe@yahoogroups.com atau kirimkan mereka file dari |
| http://groups.yahoo.com/group/XL-mania/files/Promotion/           |
+-------------------------------------------------------------------+
| Berikan testimoni di : http://www.friendster.com/xlmania atau...  |
| http://www.xl-mania.com/2008/06/testimoni-xl-mania.html           |
+-------------------------------------------------------------------+
| Message lama ada di :                                             |
| http://groups.yahoo.com/group/XL-mania/messages [perlu yahoo id]  |
| http://www.mail-archive.com/xl-mania@yahoogroups.com              |
+-------------------------------------------------------------------+
.

__,_._,___

Nenhum comentário:

Arquivo do blog