Messages In This Digest (5 Messages)
- 1a.
- Re: Mencari Data Terakhir yang Diinput From: summonery
- 2a.
- Re: Belajar Penggunaan Sintax Me dalam VBA From: STDEV(i)
- 2b.
- Bls: [belajar-excel] Belajar Penggunaan Sintax Me dalam VBA From: Kurei recca
- 3a.
- Belajar istilah vb From: tjahyahartono@yahoo.co.id
- 3b.
- Re: Belajar istilah vb From: STDEV(i)
Messages
- 1a.
-
Re: Mencari Data Terakhir yang Diinput
Posted by: "summonery" summonery@yahoo.com summonery
Sat Aug 6, 2011 10:19 pm (PDT)
coba juga,
=lookup(2,1/(a:a<>"") ,a:a)
>semoga bermanfaat
--- In belajar-excel@yahoogroups. , Zerlinda Seismica <seismica@..com .>
wrote:
>
> Salam Excel
>
> Mohon maaf kalo ternyata repost, sudah saya cari difile lama tapi
belum bisa saya pakai. Saya hanya mau mencari data yang terakhir dinput.
Saya lampirkan contoh kasus
> Thx
> Salam
>
> Seismica
>
- 2a.
-
Re: Belajar Penggunaan Sintax Me dalam VBA
Posted by: "STDEV(i)" setiyowati.devi@gmail.com siti_vi
Sat Aug 6, 2011 10:23 pm (PDT)
*Me*. adalah *mewakili Object* yg menjadi wadah dimana Procedures yg
dituliskan
misal 1:
=====
anda menuloiskan Makro (prosedur-prosedur) di module milik Sheet1
maka jika dikatakan
*Me.TextBox1 = 120*
sama dengan
*Sheets("Sheet1").TextBox1 = 120*
maksudnya adalah mengisi value 120 ke TextBox1 yg berada (milik) Sheet1
Sheet1 Sendiri sebagai Object Worksheet dlm statement di atas di
expresikan dengan Me.
*Me.Range("F16").EntireColum. Delete*
*
*
Sebetulnya Me di atas (sebg wakil Object Sheet1) tidak perlu ditulis,
karena prosedur sudah berada di MOdule milik Sheet1
misal 2:
=====
Anda menulis prosedur-prosedur pada Module UserForm1
*Me.Top = 500*
mengeSET Top milik USERFORM menjadi 500
*Me.BackColor = RGB(100, 155, 256)*
sama nilainya dengan
UserForm1.BackColor = RGB(100.155.256)
*Unload Me*
mengUnload UserForm1 (dari keadaan tertayang menjadi hilang)
*Me.Hide*
meyembunyikan (me non aktifkan ) Userform1
mudah mudahan yang hanya sekelumit ini cukup dapat difahami
~siti
2011/8/7 Kurei recca <yusajing_ehm@yahoo.com >
> **
>
>
> Salam Para Master Excel,
>
> Sebelumnya mohon maaf karena tidak melampirkan file karena memang belum ada
> kasus penggunaan me-nya.
> Saya sering melihat penggunaan me dalam coding vba macro. Me.*Expression * akan
> tetapi saya belum memahami bagaimana cara kerja / proses me ini ?
> Mohon pencerahan penggunaan *me.expression *tersebut.
> (Tolong dengan bahasa yang mudah dimengerti ya.. heeehee karena sudah baca
> help pun masih belum paham)
>
> Kalo boleh bisa pake contoh kasuss
>
> Terimakasih yang sebesar besarnya
>
> Best Regards,
> Ridwan SH
>
- 2b.
-
Bls: [belajar-excel] Belajar Penggunaan Sintax Me dalam VBA
Posted by: "Kurei recca" yusajing_ehm@yahoo.com yusajing_ehm
Sat Aug 6, 2011 10:50 pm (PDT)
Oke,
Terimakasih atas penjelasannya mbak siti,
_____________________ _________ __
Dari: STDEV(i) <setiyowati.devi@gmail.com >
Kepada: belajar-excel@yahoogroups. com
Dikirim: Minggu, 7 Agustus 2011 12:23
Judul: Re: [belajar-excel] Belajar Penggunaan Sintax Me dalam VBA
Me. adalah mewakili Object yg menjadi wadah dimana Procedures yg dituliskan
misal 1:
=====
anda menuloiskan Makro (prosedur-prosedur) di module milik Sheet1
maka jika dikatakan
Me.TextBox1 = 120
sama dengan
Sheets("Sheet1").TextBox1 = 120
maksudnya adalah mengisi value 120 ke TextBox1 yg berada (milik) Sheet1
Sheet1 Sendiri sebagai Object Worksheet dlm statement di atas di
expresikan dengan Me.
Me.Range("F16").EntireColum. Delete
Sebetulnya Me di atas (sebg wakil Object Sheet1) tidak perlu ditulis,
karena prosedur sudah berada di MOdule milik Sheet1
misal 2:
=====
Anda menulis prosedur-prosedur pada Module UserForm1
Me.Top = 500
mengeSET Top milik USERFORM menjadi 500
Me.BackColor = RGB(100, 155, 256)
sama nilainya dengan
UserForm1.BackColor = RGB(100.155.256)
Unload Me
mengUnload UserForm1 (dari keadaan tertayang menjadi hilang)
Me.Hide
meyembunyikan (me non aktifkan ) Userform1
mudah mudahan yang hanya sekelumit ini cukup dapat difahami
~siti
2011/8/7 Kurei recca <yusajing_ehm@yahoo.com >
>
>Salam Para Master Excel,
>
>
>Sebelumnya mohon maaf karena tidak melampirkan file karena memang belum ada kasus penggunaan me-nya.
>Saya sering melihat penggunaan me dalam coding vba macro. Me.Expressionakan tetapi saya belum memahami bagaimana cara kerja / proses me ini ?
>Mohon pencerahan penggunaan me.expression tersebut.
>(Tolong dengan bahasa yang mudah dimengerti ya.. heeehee karena sudah baca help pun masih belum paham)
>
>
>Kalo boleh bisa pake contoh kasuss
>
>
>Terimakasih yang sebesar besarnya
>
>
>Best Regards,
>Ridwan SH
- 3a.
-
Belajar istilah vb
Posted by: "tjahyahartono@yahoo.co.id" tjahyahartono@yahoo.co.id tjahyahartono
Sat Aug 6, 2011 10:59 pm (PDT)
Dear master x-cel,
Saya seringkali liat istilah 'dim' ...'as'... Dan juga 'set' ...=... Terus istilah 'for' ...=....
Apaan ya itu, seringkali kalo aq amati kalo pake vb mesti awalannya itu.sekalian tanya karna tadi ada yg tanya syntax me, aq tanya lainnya.
Thank's
Tjahya
Sent from my BlackBerry� - 3b.
-
Re: Belajar istilah vb
Posted by: "STDEV(i)" setiyowati.devi@gmail.com siti_vi
Sat Aug 6, 2011 11:47 pm (PDT)
Kita sedang membicarakan bahasa VBA.
*
*
*Variable *
A named storage location that can contain data that can be modified during
program execution.
Each variable has a name that uniquely identifies it within its scope. A
data type can be specified or not.
Variable names must begin with an alphabetic character, must be unique
within the same scope,
can't be longer than 255 characters, and can't contain an embedded period or
type-declaration character.
Sebelum digunakan, variable sebaiknya dideklarasikan (ditentukan namanya,
scope-nya, type data nya)
Salah satu statement untuk mendeklarasikan Variable adalah Dim (mungkin
dari kata Dimension)
Dim MyVar As Long
mendeklarasikan variable bernama MyVal dengan type data = Bilangan
LongInteger
Dim KolomNIK As Range
mendeklarasikan variable bernama KolomNIK, type datanya Object Range
Public R As Integer
mendeklarasikan variable bernama Rl dengan type data = Bilangan Integer
dengan scope (daerah berlaku dan umur) yg lebih luas.
MyVar = 65536
Menginisialisasi /mengisi *Variable data* bernama dengan nilai 65536
*Set* KolomNIK = Sheet1.Range("H2:H78")
Menantukan / mengisi* variable OBJECT* Range bernama KolomNIK untuk
mewakili
Range("H2:H78") yg ada di Sheet1
Untuk hal hal lain pak Tjahya dapat membuka VBE, klik Aikon TandaTanya
(HELP)
isikan keyword yg ingin diketahui.
[image: VBE help.GIF]
Kembali saya menyatakan (untuk kesekian kalinya) : balajar pemrograman tanpa
pegang buku text-nya
akan sama dengan Nakoda yg berlayar tanpa membawa kompas dan peta...
*Pertanyaan:*
Apakah yg berbeda dalam menginisialisasi *variable data* dan* variable
object ?*
*
*
2011/8/7 <tjahyahartono@yahoo.co. >id
> Saya seringkali liat istilah *'dim' ...'as'.*.. Dan juga 'set' ...=...
Terus istilah* 'for' *...=....
> *Apaan* ya itu, seringkali kalo aq amati kalo pake vb mesti awalannya itu.
> sekalian tanya karna tadi ada yg tanya syntax me, aq tanya lainnya.
>
> Thank's
> Tjahya
----------
Declaring Variables
When declaring variables, you usually use a Dim statement. A declaration statement can be placed within a procedure to create a procedure-level variable. Or it may be placed at the top of a module, in the Declarations section, to create a module-level variable.
The following example creates the variable strName and specifies the String data type.
Dim strName As String
If this statement appears within a procedure, the variable strName can be used only in that procedure. If the statement appears in the Declarations section of the module, the variable strName is available to all procedures within the module, but not to procedures in other modules in the project. To make this variable available to all procedures in the project, precede it with the Public statement, as in the following example:
Public strName As String
For information about naming your variables, see "Visual Basic Naming Rules" in Visual Basic Help.
Variables can be declared as one of the following data types: Boolean, Byte, Integer, Long, Currency, Single, Double, Date, String (for variable-length strings), String * length (for fixed-length strings), Object, or Variant. If you do not specify a data type, the Variant data type is assigned by default. You can also create a user-defined type using the Type statement. For more information on data types, see "Data Type Summary" in Visual Basic Help.
You can declare several variables in one statement. To specify a data type, you must include the data type for each variable. In the following statement, the variables intX, intY, and intZ are declared as type Integer.
Dim intX As Integer, intY As Integer, intZ As Integer
In the following statement, intX and intY are declared as type Variant; only intZ is declared as type Integer.
Dim intX, intY, intZ As Integer
You don't have to supply the variable's data type in the declaration statement. If you omit the data type, the variable will be of type Variant.
Using the Public Statement
You can use the Public statement to declare public module-level variables.
Public strName As String
Public variables can be used in any procedures in the project. If a public variable is declared in a standard module or a class module, it can also be used in any projects that reference the project where the public variable is declared.
Using the Private Statement
You can use the Private statement to declare private module-level variables.
Private MyName As String
Private variables can be used only by procedures in the same module.
Note When used at the module level, the Dim statement is equivalent to the Private statement. You might want to use the Private statement to make your code easier to read and interpret.
Using the Static Statement
When you use the Static statement instead of a Dim statement, the declared variable will retain its value between calls.
Using the Option Explicit Statement
You can implicitly declare a variable in Visual Basic simply by using it in an assignment statement. All variables that are implicitly declared are of type Variant. Variables of type Variant require more memory resources than most other variables. Your application will be more efficient if you declare variables explicitly and with a specific data type. Explicitly declaring all variables reduces the incidence of naming-conflict errors and spelling mistakes.
If you don't want Visual Basic to make implicit declarations, you can place the Option Explicit statement in a module before any procedures. This statement requires you to explicitly declare all variables within the module. If a module includes the Option Explicit statement, a compile-time error will occur when Visual Basic encounters a variable name that has not been previously declared, or that has been spelled incorrectly.
You can set an option in your Visual Basic programming environment to automatically include the Option Explicit statement in all new modules. See your application's documentation for help on how to change Visual Basic environment options. Note that this option does not change existing code you have written.
Note You must explicitly declare fixed arrays and dynamic arrays.
Declaring an Object Variable for Automation
When you use one application to control another application's objects, you should set a reference to the other application' s type library. Once you set a reference, you can declare object variables according to their most specific type. For example, if you are in Microsoft Word when you set a reference to the Microsoft Excel type library, you can declare a variable of type Worksheet from within Microsoft Word to represent a Microsoft Excel Worksheet object.
If you are using another application to control Microsoft Access objects, in most cases, you can declare object variables according to their most specific type. You can also use the New keyword to create a new instance of an object automatically. However, you may have to indicate that it is a Microsoft Access object. For example, when you declare an object variable to represent a Microsoft Access form from within Microsoft Visual Basic, you must distinguish the Microsoft Access Form object from a Visual Basic Form object. Include the name of the type library in the variable declaration, as in the following example:
Dim frmOrders As New Access.Form
Some applications don't recognize individual Microsoft Access object types. Even if you set a reference to the Microsoft Access type library from these applications, you must declare all Microsoft Access object variables as type Object. Nor can you use the New keyword to create a new instance of the object. The following example shows how to declare a variable to represent an instance of the Microsoft Access Application object from an application that doesn't recognize Microsoft Access object types. The application then creates an instance of the Application object.
Dim appAccess As Object
Set appAccess = CreateObject("Access.Applicat ion")
To determine which syntax an application supports, see the application's documentation.
----------
Using For...Next Statements
You can use For...Next statements to repeat a block of statements a specific number of times. For loops use a counter variable whose value is increased or decreased with each repetition of the loop.
The following procedure makes the computer beep 50 times. The For statement specifies the counter variable x and its start and end values. The Next statement increments the counter variable by 1.
Sub Beeps()
For x = 1 To 50
Beep
Next x
End Sub
Using the Step keyword, you can increase or decrease the counter variable by the value you specify. In the following example, the counter variable j is incremented by 2 each time the loop repeats. When the loop is finished, total is the sum of 2, 4, 6, 8, and 10.
Sub TwosTotal()
For j = 2 To 10 Step 2
total = total + j
Next j
MsgBox "The total is " & total
End Sub
To decrease the counter variable, use a negative Step value. To decrease the counter variable, you must specify an end value that is less than the start value. In the following example, the counter variable myNum is decreased by 2 each time the loop repeats. When the loop is finished, total is the sum of 16, 14, 12, 10, 8, 6, 4, and 2.
Sub NewTotal()
For myNum = 16 To 2 Step -2
total = total + myNum
Next myNum
MsgBox "The total is " & total
End Sub
Note It's not necessary to include the counter variable name after the Next statement. In the preceding examples, the counter variable name was included for readability.
You can exit a For...Next statement before the counter reaches its end value by using the Exit For statement. For example, when an error occurs, use the Exit For statement in the True statement block of either an If...Then...Else statement or a Select Case statement that specifically checks for the error. If the error doesn't occur, then the If�Then�Else statement is False, and the loop will continue to
Need to Reply?
Click one of the "Reply" links to respond to a specific message in the Daily Digest.
---------------------------------------------------------------------
bergabung ke milis (subscribe), kirim mail kosong ke:
belajar-excel-subscribe@yahoogroups.com
posting ke milis, kirimkan ke:
belajar-excel@yahoogroups.com
berkunjung ke web milis
http://tech.groups.yahoo.com/group/belajar-excel/messages
melihat file archive / mendownload lampiran
http://www.mail-archive.com/belajar-excel@yahoogroups.com/
atau (sejak 25-Apr-2011) bisa juga di :
http://milis-belajar-excel.1048464.n5.nabble.com/
menghubungi moderators & owners: belajar-excel-owner@yahoogroups.com
keluar dari membership milis (UnSubscribe):
kirim mail kosong ke belajar-excel-unsubscribe@yahoogroups.com
---------------------------------------------------------------------
bergabung ke milis (subscribe), kirim mail kosong ke:
belajar-excel-subscribe@yahoogroups.com
posting ke milis, kirimkan ke:
belajar-excel@yahoogroups.com
berkunjung ke web milis
http://tech.groups.yahoo.com/group/belajar-excel/messages
melihat file archive / mendownload lampiran
http://www.mail-archive.com/belajar-excel@yahoogroups.com/
atau (sejak 25-Apr-2011) bisa juga di :
http://milis-belajar-excel.1048464.n5.nabble.com/
menghubungi moderators & owners: belajar-excel-owner@yahoogroups.com
keluar dari membership milis (UnSubscribe):
kirim mail kosong ke belajar-excel-unsubscribe@yahoogroups.com
---------------------------------------------------------------------
Change settings via the Web (Yahoo! ID required)
Change settings via email: Switch delivery to Individual | Switch format to Traditional
Visit Your Group | Yahoo! Groups Terms of Use | Unsubscribe
Tidak ada komentar:
Posting Komentar