WCM - Das österreichische Computer Magazin Forenübersicht
 

Zurück   WCM Forum > Rat & Tat > Programmierung

Programmierung Rat & Tat für Programmierer

Microsoft KARRIERECAMPUS

 
 
Themen-Optionen Ansicht
Alt 04.12.2002, 20:17   #8
Seidl
Veteran
 
Registriert seit: 10.01.2001
Beiträge: 478


Standard

Meinst du sowas in der Art?


Public Function SucheNachString()
MsgBox FindFirst("Alter"), vbOKOnly + vbInformation, "Suchergebnis"
End Function

Public Function SucheNachZahl()
MsgBox FindFirst(19), vbOKOnly + vbInformation, "Suchergebnis"
End Function


Public Function FindFirst(FindWhat As Variant) As String
Dim rngAll As Excel.Range
Dim rngFound As Excel.Range
Dim strRow As String
Dim strCol As String
Dim lngCol As Long
Dim CharCode As Long
Set rngAll = Application.ActiveSheet.Cells
Set rngFound = rngAll.Find(FindWhat)
If Not rngFound Is Nothing Then
strRow = CStr(rngFound.Row)
lngCol = rngFound.Column
Do While lngCol > 0
CharCode = lngCol Mod 26
If CharCode = 0 Then
CharCode = 26
End If
strCol = Chr(64 + CharCode) & strCol
lngCol = (lngCol - CharCode) / 26
Loop
FindFirst = "Row:" & vbTab & strRow & vbNewLine & "Column:" & vbTab & strCol
Else
FindFirst = "Sowos gibt's do net!"
End If
End Function
Seidl ist offline   Mit Zitat antworten
 


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 

Forumregeln
Es ist Ihnen nicht erlaubt, neue Themen zu verfassen.
Es ist Ihnen nicht erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.

Gehe zu


Alle Zeitangaben in WEZ +2. Es ist jetzt 20:15 Uhr.


Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Forum SEO by Zoints
© 2009 FSL Verlag