PDA

Vollständige Version anzeigen : Ändern von VB/VBA-Code...?????


druschba
30.08.2001, 08:16
Hallo!
Ich habe da mal ein Problem...ich würde gern immer wieder kehrende Code-Teile (z.B. on error goto etc...) per VBA in den Programm-Code hineinschreiben...

Wer weiss was??
Merci im Vorraus!
Druschba!

Birgit Dannenberg
30.08.2001, 11:09
Da hast Du Dir aber was vorgenommen!!!

Sieh Dir dazu mal die Methoden des Modul-Objekts an (AddFromString etc.).
Ich glaube nur, das hast Du schneller eingegeben als programmiert... :)

hth Birgit

EricB
30.08.2001, 11:46
Hallo!

Ich habe mal auf die schnelle etwas erstellt. Ist sicher nicht eine Coder-Glanzleistung, aber es funktioniert!

Ich habe ein mdb-Template. Darin den Code und 2 Makros für Tastaturbelegung. In einem neuen Projekt importiere ich die beiden.

Wenn ich fertig bin, deaktiviere ich die Tastaturbelegung!

Ach ja: Beim Fehlercode muss der Cursor am Beginn der zeile "Public, Private,.. " stehen, da der Functionsname eingelesen wird!

Ciao
Eric


Option Compare Database
Option Explicit

Declare Function GlobalUnlock Lib "kernel32" (ByVal hMem As Long) As Long
Declare Function GlobalLock Lib "kernel32" (ByVal hMem As Long) As Long
Declare Function GlobalAlloc Lib "kernel32" (ByVal wFlags As Long, _
ByVal dwBytes As Long) As Long
Declare Function CloseClipboard Lib "user32" () As Long
Declare Function OpenClipboard Lib "user32" (ByVal hWnd As Long) As Long
Declare Function EmptyClipboard Lib "user32" () As Long

Declare Function lstrcpy Lib "kernel32" (ByVal lpString1 As Any, _
ByVal lpString2 As Any) As Long
Declare Function SetClipboardData Lib "user32" (ByVal wFormat _
As Long, ByVal hMem As Long) As Long
Declare Function GetClipboardData Lib "user32" (ByVal wFormat As _
Long) As Long

Declare Function GlobalSize Lib "kernel32" (ByVal hMem As Long) As Long

Public Const GHND = &H42
Public Const CF_TEXT = 1
Public Const MAXSIZE = 4096


Dim ZEILE(1 To 12) As String
Dim P_Name As String


Public Function Fehlercode_erstellen()
Dim F_Code As String
Dim ZeileNr As Integer
Dim start As Integer
Dim Start_Art As Integer
Dim Ende_Art As Integer
Dim Ende As Integer
Dim i As Integer
Dim Name As String
Dim Art As String


'Den Prozedurnamen in die Zwischenablage einfügen
SendKeys "{Home}", True
SendKeys "+{End}", True
SendKeys "^{Insert}", True


'Den Prozedurnamen aus der Zwischenablage an die Variable übergeben
P_Name = ClipBoard_GetData


Ende = InStr(CStr(P_Name), "(") '- 1

For i = Ende To 1 Step -1
If Mid(P_Name, i, 1) = " " Then
start = i + 1
Ende_Art = start - 2
Exit For
End If
Next i

Name = Mid$(P_Name, start, Ende - start)

For i = Ende_Art To 1 Step -1
If Mid(P_Name, i, 1) = " " Then
Start_Art = i + 1
Exit For
Else
Start_Art = 1
End If
Next i

Art = Mid$(P_Name, Start_Art, Ende_Art - Start_Art + 1)

ZEILE(1) = "If cError = False Then On Error GoTo Err_" & Name
ZEILE(2) = ""
ZEILE(3) = ""
ZEILE(4) = ""
ZEILE(5) = "Exit_" & Name & ":"
ZEILE(6) = Space(4) & "Exit " & Art
ZEILE(7) = ""
ZEILE(8) = "Err_" & Name & ":"
ZEILE(9) = Space(4) & "MsgBox ""FEHLER "" & Err.Number & "": "" & Err.Description"
ZEILE(10) = Space(4) & "Resume Exit_" & Name

F_Code = ""
For ZeileNr = 1 To 10
F_Code = F_Code & ZEILE(ZeileNr) & Chr$(13)
Next ZeileNr


ClipBoard_SetData (F_Code)


SendKeys "{Down}"
SendKeys "+{Insert}"
SendKeys "{Up 8}"
SendKeys "{Tab}{Tab}"

End Function

'------------------------------------------------------
' Daten zur Zwischenablage senden
'------------------------------------------------------
Function ClipBoard_SetData(MyString As String)

Dim hGlobalMemory As Long, lpGlobalMemory As Long

Dim hClipMemory As Long, x As Long

' Allocate moveable global memory.
'-------------------------------------------
hGlobalMemory = GlobalAlloc(GHND, Len(MyString) + 1)

' Lock the block to get a far pointer to this memory.
lpGlobalMemory = GlobalLock(hGlobalMemory)

' Copy the string to this global memory.
lpGlobalMemory = lstrcpy(lpGlobalMemory, MyString)

' Unlock the memory.

If GlobalUnlock(hGlobalMemory) <> 0 Then
MsgBox "Could not unlock memory location. Copy aborted."
GoTo OutOfHere2
End If

' Open the Clipboard to copy data to.
If OpenClipboard(0&) = 0 Then
MsgBox "Could not open the Clipboard. Copy aborted."
Exit Function
End If

' Clear the Clipboard.
x = EmptyClipboard()

' Copy the data to the Clipboard.

hClipMemory = SetClipboardData(CF_TEXT, hGlobalMemory)

OutOfHere2:

If CloseClipboard() = 0 Then
MsgBox "Could not close Clipboard."
End If

End Function


'--------------------------------------------------
' Daten aus der Zwischenablage einfügen
'--------------------------------------------------
Function ClipBoard_GetData()

Dim hClipMemory As Long
Dim lpClipMemory As Long
Dim MyString As String
Dim RetVal As Long

If OpenClipboard(0&) = 0 Then
MsgBox "Cannot open Clipboard. Another app. may have it open"
Exit Function
End If

' Obtain the handle to the global memory
' block that is referencing the text.
hClipMemory = GetClipboardData(CF_TEXT)
If IsNull(hClipMemory) Then
MsgBox "Could not allocate memory"
GoTo OutOfHere
End If

' Lock Clipboard memory so we can reference the actual data string.
lpClipMemory = GlobalLock(hClipMemory)

If Not IsNull(lpClipMemory) Then

MyString = Space$(MAXSIZE)
RetVal = lstrcpy(MyString, lpClipMemory)
RetVal = GlobalUnlock(hClipMemory)

' Peel off the null terminating character.
MyString = Mid(MyString, 1, InStr(1, MyString, Chr$(0), 0) - 1)
Else
MsgBox "Could not lock memory to copy string from."
End If

OutOfHere:

RetVal = CloseClipboard()
ClipBoard_GetData = MyString

End Function

Public Function Kommentar_1()

Dim i As Integer
SendKeys "'"

For i = 0 To 70
SendKeys "-"
Next

End Function

Public Function Header_Erstellen()

Dim Header As String, ZeileNr As Integer

ZEILE(1) = "'--------------------------------------------------------------------------"
ZEILE(2) = "'Aktion.......: "
ZEILE(3) = "'"
ZEILE(4) = "'Parameter....: "
ZEILE(5) = "'"
ZEILE(6) = "'"
ZEILE(7) = "'"
ZEILE(8) = "'Rückgabewerte: "
ZEILE(9) = "'"
ZEILE(10) = "'Erstellt.....: " & Date
ZEILE(11) = "'Geändert.....: "
ZEILE(12) = "'--------------------------------------------------------------------------"

Header = ""
For ZeileNr = 1 To 12
Header = Header & ZEILE(ZeileNr) & vbCrLf
Next ZeileNr


ClipBoard_SetData (Header)


SendKeys "{Down}"
SendKeys "+{Insert}"
SendKeys "{Up 11}"
SendKeys "{End}"
' SendKeys " "
SendKeys "{Tab}"

End Function

EricB
30.08.2001, 11:48
Nochmals - Konvertiert...

<div><link href="http://www.ms-office-forum.net/forum/externals/codeconv.css" rel="stylesheet"><pre><span class="TOKEN">Option</span> <span class="TOKEN">Compare</span> <span class="TOKEN">Database</span>
<span class="TOKEN">Option</span> <span class="TOKEN">Explicit</span>
&nbsp;
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> GlobalUnlock <span class="TOKEN">Lib</span> &quot;kernel32&quot; (<span class="TOKEN">ByVal</span> hMem <span class="TOKEN">As</span> <span class="TOKEN">Long</span>) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> GlobalLock <span class="TOKEN">Lib</span> &quot;kernel32&quot; (<span class="TOKEN">ByVal</span> hMem <span class="TOKEN">As</span> <span class="TOKEN">Long</span>) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> GlobalAlloc <span class="TOKEN">Lib</span> &quot;kernel32&quot; (<span class="TOKEN">ByVal</span> wFlags <span class="TOKEN">As</span> Long, _
<span class="TOKEN">ByVal</span> dwBytes <span class="TOKEN">As</span> <span class="TOKEN">Long</span>) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> CloseClipboard <span class="TOKEN">Lib</span> &quot;user32&quot; () <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> OpenClipboard <span class="TOKEN">Lib</span> &quot;user32&quot; (<span class="TOKEN">ByVal</span> hWnd <span class="TOKEN">As</span> <span class="TOKEN">Long</span>) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> EmptyClipboard <span class="TOKEN">Lib</span> &quot;user32&quot; () <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
&nbsp;
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> lstrcpy <span class="TOKEN">Lib</span> &quot;kernel32&quot; (<span class="TOKEN">ByVal</span> lpString1 <span class="TOKEN">As</span> Any, _
<span class="TOKEN">ByVal</span> lpString2 <span class="TOKEN">As</span> Any) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> SetClipboardData <span class="TOKEN">Lib</span> &quot;user32&quot; (<span class="TOKEN">ByVal</span> wFormat _
<span class="TOKEN">As</span> Long, <span class="TOKEN">ByVal</span> hMem <span class="TOKEN">As</span> <span class="TOKEN">Long</span>) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> GetClipboardData <span class="TOKEN">Lib</span> &quot;user32&quot; (<span class="TOKEN">ByVal</span> wFormat <span class="TOKEN">As</span> _
<span class="TOKEN">Long</span>) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
&nbsp;
<span class="TOKEN">Declare</span> <span class="TOKEN">Function</span> GlobalSize <span class="TOKEN">Lib</span> &quot;kernel32&quot; (<span class="TOKEN">ByVal</span> hMem <span class="TOKEN">As</span> <span class="TOKEN">Long</span>) <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
&nbsp;
<span class="TOKEN">Public</span> <span class="TOKEN">Const</span> GHND = &amp;H42
<span class="TOKEN">Public</span> <span class="TOKEN">Const</span> CF_TEXT = 1
<span class="TOKEN">Public</span> <span class="TOKEN">Const</span> MAXSIZE = 4096
&nbsp;
&nbsp;
<span class="TOKEN">Dim</span> ZEILE(1 <span class="TOKEN">To</span> 12) <span class="TOKEN">As</span> <span class="TOKEN">String</span>
<span class="TOKEN">Dim</span> P_Name <span class="TOKEN">As</span> <span class="TOKEN">String</span>
&nbsp;
&nbsp;
<span class="TOKEN">Public Function</span> Fehlercode_erstellen()
<span class="TOKEN">Dim</span> F_Code <span class="TOKEN">As</span> <span class="TOKEN">String</span>
<span class="TOKEN">Dim</span> ZeileNr <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
<span class="TOKEN">Dim</span> start <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
<span class="TOKEN">Dim</span> Start_Art <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
<span class="TOKEN">Dim</span> Ende_Art <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
<span class="TOKEN">Dim</span> Ende <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
<span class="TOKEN">Dim</span> i <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
<span class="TOKEN">Dim</span> Name <span class="TOKEN">As</span> <span class="TOKEN">String</span>
<span class="TOKEN">Dim</span> Art <span class="TOKEN">As</span> <span class="TOKEN">String</span>
&nbsp;
&nbsp;
<span class="REM"> 'Den Prozedurnamen in die Zwischenablage einfügen</span>
SendKeys &quot;{Home}&quot;, <span class="TOKEN">True</span>
SendKeys &quot;+{End}&quot;, <span class="TOKEN">True</span>
SendKeys &quot;^{Insert}&quot;, <span class="TOKEN">True</span>
&nbsp;
&nbsp;
<span class="REM"> 'Den Prozedurnamen aus der Zwischenablage an die Variable übergeben</span>
P_Name = ClipBoard_GetData
&nbsp;
&nbsp;
Ende = InStr(<span class="TOKEN">CStr</span>(P_Name), &quot;(&quot ; ) <span class="REM">'- 1</span>
&nbsp;
<span class="TOKEN">For</span> i = Ende <span class="TOKEN">To</span> 1 <span class="TOKEN">Step</span> -1
<span class="TOKEN">If</span> Mid(P_Name, i, 1) = &quot; &quot; <span class="TOKEN">Then</span>
start = i + 1
Ende_Art = start - 2
<span class="TOKEN">Exit For</span>
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
<span class="TOKEN">Next</span> i
&nbsp;
Name = Mid$(P_Name, start, Ende - start)
&nbsp;
<span class="TOKEN">For</span> i = Ende_Art <span class="TOKEN">To</span> 1 <span class="TOKEN">Step</span> -1
<span class="TOKEN">If</span> Mid(P_Name, i, 1) = &quot; &quot; <span class="TOKEN">Then</span>
Start_Art = i + 1
<span class="TOKEN">Exit For</span>
<span class="TOKEN">Else</span>
Start_Art = 1
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
<span class="TOKEN">Next</span> i
&nbsp;
Art = Mid$(P_Name, Start_Art, Ende_Art - Start_Art + 1)
&nbsp;
ZEILE(1) = &quot;If cError = <span class="TOKEN">False</span> <span class="TOKEN">Then</span> <span class="TOKEN">On Error GoTo</span> Err_&quot; &amp; Name
ZEILE(2) = &quot;&quot;
ZEILE(3) = &quot;&quot;
ZEILE(4) = &quot;&quot;
ZEILE(5) = &quot;Exit_&quot; &amp; Name &amp; &quot;:&quot;
ZEILE(6) = Space(4) &amp; &quot;Exit &quot; &amp; Art
ZEILE(7) = &quot;&quot;
ZEILE(8) = &quot;Err_&quot; &amp; Name &amp; &quot;:&quot;
ZEILE(9) = Space(4) &amp; &quot;MsgBox &quot;&quot;FEHLER &quot;&quot; &amp; Err.Number &amp; &quot;&quot;: &quot;&quot; &amp; Err.Description&quot;
ZEILE(10) = Space(4) &amp; &quot;Resume Exit_&quot; &amp; Name
&nbsp;
F_Code = &quot;&quot;
<span class="TOKEN">For</span> ZeileNr = 1 <span class="TOKEN">To</span> 10
F_Code = F_Code &amp; ZEILE(ZeileNr) &amp; Chr$(13)
<span class="TOKEN">Next</span> ZeileNr
&nbsp;
&nbsp;
ClipBoard_SetData (F_Code)
&nbsp;
&nbsp;
SendKeys &quot;{Down}&quot;
SendKeys &quot;+{Insert}&quot;
SendKeys &quot;{Up 8}&quot;
SendKeys &quot;{Tab}{Tab}&quot;
&nbsp;
<span class="TOKEN">End</span> <span class="TOKEN">Function</span>
&nbsp;
<span class="REM">'------------------------------------------------------</span>
<span class="REM">' Daten zur Zwischenablage senden</span>
<span class="REM">'------------------------------------------------------</span>
<span class="TOKEN">Function</span> ClipBoard_SetData(MyString <span class="TOKEN">As</span> <span class="TOKEN">String</span>)
&nbsp;
<span class="TOKEN">Dim</span> hGlobalMemory <span class="TOKEN">As</span> Long, lpGlobalMemory <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
&nbsp;
<span class="TOKEN">Dim</span> hClipMemory <span class="TOKEN">As</span> Long, x <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
&nbsp;
<span class="REM"> ' Allocate moveable global memory.</span>
<span class="REM"> '-------------------------------------------</span>
hGlobalMemory = GlobalAlloc(GHND, Len(MyString) + 1)
&nbsp;
<span class="REM"> ' Lock the block to get a far pointer to this memory.</span>
lpGlobalMemory = GlobalLock(hGlobalMemory)
&nbsp;
<span class="REM"> ' Copy the string to this global memory.</span>
lpGlobalMemory = lstrcpy(lpGlobalMemory, MyString)
&nbsp;
<span class="REM"> ' Unlock the memory.</span>
&nbsp;
<span class="TOKEN">If</span> GlobalUnlock(hGlobalMemory) &lt;&gt; 0 <span class="TOKEN">Then</span>
MsgBox &quot;Could not unlock memory location. Copy aborted.&quot;
GoTo OutOfHere2
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
&nbsp;
<span class="REM"> ' Open the Clipboard to copy data to.</span>
<span class="TOKEN">If</span> OpenClipboard(0&amp; ) = 0 <span class="TOKEN">Then</span>
MsgBox &quot;Could not open the Clipboard. Copy aborted.&quot;
<span class="TOKEN">Exit Function</span>
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
&nbsp;
<span class="REM"> ' Clear the Clipboard.</span>
x = EmptyClipboard()
&nbsp;
<span class="REM"> ' Copy the data to the Clipboard.</span>
&nbsp;
hClipMemory = SetClipboardData(CF_TEXT, hGlobalMemory)
&nbsp;
OutOfHere2:
&nbsp;
<span class="TOKEN">If</span> CloseClipboard() = 0 <span class="TOKEN">Then</span>
MsgBox &quot;Could not close Clipboard.&quot;
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
&nbsp;
<span class="TOKEN">End</span> <span class="TOKEN">Function</span>
&nbsp;
&nbsp;
<span class="REM">'--------------------------------------------------</span>
<span class="REM">' Daten aus der Zwischenablage einfügen</span>
<span class="REM">'--------------------------------------------------</span>
<span class="TOKEN">Function</span> ClipBoard_GetData()
&nbsp;
<span class="TOKEN">Dim</span> hClipMemory <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Dim</span> lpClipMemory <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
<span class="TOKEN">Dim</span> MyString <span class="TOKEN">As</span> <span class="TOKEN">String</span>
<span class="TOKEN">Dim</span> RetVal <span class="TOKEN">As</span> <span class="TOKEN">Long</span>
&nbsp;
<span class="TOKEN">If</span> OpenClipboard(0&amp ; ) = 0 <span class="TOKEN">Then</span>
MsgBox &quot;Cannot open Clipboard. Another app. may have it open&quot;
<span class="TOKEN">Exit Function</span>
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
&nbsp;
<span class="REM"> ' Obtain the handle to the global memory</span>
<span class="REM"> ' block that is referencing the text.</span>
hClipMemory = GetClipboardData(CF_TEXT)
<span class="TOKEN">If</span> IsNull(hClipMemory) <span class="TOKEN">Then</span>
MsgBox &quot;Could not allocate memory&quot;
GoTo OutOfHere
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
&nbsp;
<span class="REM"> ' Lock Clipboard memory so we can reference the actual data string.</span>
lpClipMemory = GlobalLock(hClipMemory)
&nbsp;
<span class="TOKEN">If</span> <span class="TOKEN">Not</span> IsNull(lpClipMemory) <span class="TOKEN">Then</span>
&nbsp;
MyString = Space$(MAXSIZE)
RetVal = lstrcpy(MyString, lpClipMemory)
RetVal = GlobalUnlock(hClipMemory)
&nbsp;
<span class="REM"> ' Peel off the null terminating character.</span>
MyString = Mid(MyString, 1, InStr(1, MyString, Chr$(0), 0) - 1)
<span class="TOKEN">Else</span>
MsgBox &quot;Could not lock memory to copy string from.&quot;
<span class="TOKEN">End</span> <span class="TOKEN">If</span>
&nbsp;
OutOfHere:
&nbsp;
RetVal = CloseClipboard()
ClipBoard_GetData = MyString
&nbsp;
<span class="TOKEN">End</span> <span class="TOKEN">Function</span>
&nbsp;
&nbsp;
&nbsp;
<span class="TOKEN">Public Function</span> Kommentar_1()
&nbsp;
<span class="TOKEN">Dim</span> i <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
SendKeys &quot;'&quot;
&nbsp;
<span class="TOKEN">For</span> i = 0 <span class="TOKEN">To</span> 70
SendKeys &quot;-&quot;
<span class="TOKEN">Next</span>
&nbsp;
<span class="TOKEN">End</span> <span class="TOKEN">Function</span>
&nbsp;
&nbsp;
&nbsp;
<span class="TOKEN">Public Function</span> Header_Erstellen()
&nbsp;
<span class="TOKEN">Dim</span> Header <span class="TOKEN">As</span> String, ZeileNr <span class="TOKEN">As</span> <span class="TOKEN">Integer</span>
&nbsp;
ZEILE(1) = &quot;'--------------------------------------------------------------------------&quot;
ZEILE(2) = &quot;'Aktion.......: &quot;
ZEILE(3) = &quot;'&quot;
ZEILE(4) = &quot;'Parameter....: &quot;
ZEILE(5) = &quot;'&quot;
ZEILE(6) = &quot;'&quot;
ZEILE(7) = &quot;'&quot;
ZEILE(8) = &quot;'R&uuml;ckgabewerte: &quot;
ZEILE(9) = &quot;'&quot;
ZEILE(10) = &quot;'Erstellt.....: &quot; &amp; Date
ZEILE(11) = &quot;'Ge&auml;ndert.....: &quot;
ZEILE(12) = &quot;'--------------------------------------------------------------------------&quot;
&nbsp;
Header = &quot;&quot;
<span class="TOKEN">For</span> ZeileNr = 1 <span class="TOKEN">To</span> 12
Header = Header &amp; ZEILE(ZeileNr) &amp; vbCrLf
<span class="TOKEN">Next</span> ZeileNr
&nbsp;
&nbsp;
ClipBoard_SetData (Header)
&nbsp;
&nbsp;
SendKeys &quot;{Down}&quot;
SendKeys &quot;+{Insert}&quot;
SendKeys &quot;{Up 11}&quot;
SendKeys &quot;{End}&quot;
<span class="REM">' SendKeys &quot; &quot;</span>
SendKeys &quot;{Tab}&quot;
&nbsp;
<span class="TOKEN">End</span> <span class="TOKEN">Function</span></pre></div>