1 / 11

Excel programozás (makró)

Excel programozás (makró). Gräff József 2014. MechatrSzim. Típusok. numerikus: lebegőpontos: single !, double # egész: byte, integer %, long & string: string $ logikai: boolean tömb: (alsó to felső) as típus Variant: mindenes. MechatrSzim. Változók.

vine
Télécharger la présentation

Excel programozás (makró)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Excel programozás (makró) Gräff József 2014 MechatrSzim

  2. Típusok • numerikus:lebegőpontos: single !, double #egész: byte, integer %, long & • string:string $ • logikai:boolean • tömb: (alsó to felső) as típus • Variant: mindenes MechatrSzim

  3. Változók • Dim d as integer, i%a használat közben nem kell a rövidítő karakter! • Dim a, b, cmind variant lesz! • Dim t#(5), p(1 to 3, 5 to 9) as singlet double típusú 0-tól vagy 1-től induló indexszel (Option Base) MechatrSzim

  4. Függvény, eljárás írás Function név(paraméterek) as típus vagy Function nev?(paraméterek) …. End Function Sub név(paraméterek) …. End Sub Értékkel: ByVal Címmel: ByRef (alapért.) (pointer) (Sub=void) Function Pitagorasz#(a#, b#) Pitagorasz=sqrt(a*a+b*b) End Function MechatrSzim

  5. Függvény, eljárás hívás ByRef esetén kötelező változót használni Eljárásnál, ha több paraméter van, kötelező a CALL használata: Call eljárás2(3,5) Eljárás1(fa) MechatrSzim

  6. Ciklusok 1 FOR: for vált=kezd to vég [lépés] … Next vált (Exit For = break) WHILE: while feltétel … Wend (amíg igaz ismétel) MechatrSzim

  7. Ciklusok 2 Do While vagy Until feltétel … Loop While feltétel: ismétel, amíg igaz (Exit Do = break) Do … Loop While vagy Until feltétel Until feltétel: ismétel, amíg igazzá nem válik (Exit Do = break) MechatrSzim

  8. Elágazások if If feltétel Then teendő1 Else teendő2 If feltétel Then teendők1 Else teendők2 End if MechatrSzim

  9. Elágazások select case Select Case numkif vagy string Case eset1 teendők1 … Case esetn teendőkn Case Else teendők egyébként End Select (NINCS BREAK!!!!) MechatrSzim

  10. Kapcsolat az Excel cellákkal A variant típusú CELLS tömb sor, oszlop sorendű indexeléssel Tanács: Record Macro!!!!!!!!!!!!

  11. Köszönöm a figyelmet!

More Related