Tecnologia, programação e muito Visual FoxPro.

terça-feira, 28 de setembro de 2010

Re: ]] XL-mania [[ .::: detect Computer Name dari xls dengan formula atau macro :::.

 

wow..!! (bhs jawanya wow = "wee... lhadalah...")
ada yg mau meringkas lagi dengan menghubungkan nilai Argument [NameType] 
vs N (=parameter milik object Environtment(N))
Karena sesungguhnya mulai case ke 4 kedua item tsb selalu sebanding sesuai deret hitung
yaitu : NameTYpe = 4,   N = 1,  dst selalu selisih 3

makanya case yg panjang dapat diringkas oleh pak anton dengan fungsi Iif:
Jeneng2Rev = IIf(NameType < 4, _
   Choose(NameType, Application.UserName, Environ("UserName"), Environ("ComputerName")), _
   Environ(m - 3))




2010/9/26 anton suryadi <summonery@yahoo.com>


Ooops, ada yang kelewat.. ^_^

revisi:

Function Jeneng2Rev(Optional NameType As String) As String
    Dim m As Integer

    Application.Volatile
    If Len(NameType) = 0 Then NameType = 1
    m = WorksheetFunction.Max(4, NameType)
    Jeneng2Rev = IIf(NameType < 4, Choose(NameType, Application.UserName, Environ("UserName"), Environ("ComputerName")), Environ(m - 3))
End Function


>semoga bermanfaat



__._,_.___
Recent Activity:
+-:: XL-mania ::::::::::::::::::::----------------------------------+
| oppsss... thr-nya kok cepet banget ya habisnya....  T_____T       |
| 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              |
+-------------------------------------------------------------------+
MARKETPLACE

Hobbies & Activities Zone: Find others who share your passions! Explore new interests.


Get great advice about dogs and cats. Visit the Dog & Cat Answers Center.


Stay on top of your group activity without leaving the page you're on - Get the Yahoo! Toolbar now.

.

__,_._,___

Nenhum comentário:

Arquivo do blog