Re: if then abfrage mit selection.find
- From: "Andreas" <Andreas@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Mon, 6 Jun 2005 06:55:12 -0700
Hallo Bernd,
Vielen Dank hat funktioniert!
Endlich..... ;)
"Bernd Held" schrieb:
> Hallo Andreas,
>
>
> "Andreas" <Andreas@xxxxxxxxxxxxxxxxxxxxxxxxx> schrieb im Newsbeitrag
> news:6E880196-E541-4068-8180-BE3B23D5084C@xxxxxxxxxxxxxxxx
> > Hallo VBA experts,
> >
> > ich habe ein problem mit Selection.Find.
> > bsp:
> > Selection.Find(what:=String, after:=ActiveCell, LookIn:=xlFormulas,
> > lookat:=xlPart, searchorder:=xlByRows, searchdirection:=xlNext,
> > MatchCase:=False, searchformat:=False)
> >
> > lautet meine abfrage.
> > Wenn jetzt selection.find nicht findet bekomme ich eine Fehlermeldung!
> > ich möchte aber das wenn die abfrage eben nichts findet in meinem Makro
> > etwas anderes bearbeitet.
> > ich habe es schon mit einer If abfrage probiert doch dann bekomme ich die
> > Fehlermeldung Laufzeitfehler :'92'
> > und Objektvariable oder Withblockvariable nicht festgelegt.
> >
> > Wie kann ich jetzt festlegen das wenn "selektion.find" nichts findet also
> > false wäre oder so, dann etwas anderes machen soll!!!
> >
> > Vielen dank im Vorraus für eure Hilfe,
> > ich bin für jeden Rat dankbar!
> > MFG Andreas
>
> set Zelle=Selection.Find(what:=String, after:=ActiveCell,
> LookIn:=xlFormulas,
> lookat:=xlPart, searchorder:=xlByRows, searchdirection:=xlNext,
> MatchCase:=False, searchformat:=False)
> if zelle is nothing then msgbox "nix gefunden!"
>
> Viele Grüße
> Bernd
> MVP für Microsoft Excel
> VBA-Bücher mit Leseproben(PDF), Excel-VBA-Code-CDROM und Seminare
> unter http://held-office.de
>
>
>
.
- References:
- if then abfrage mit selection.find
- From: Andreas
- Re: if then abfrage mit selection.find
- From: Bernd Held
- if then abfrage mit selection.find
- Prev by Date: Makrosicherheit
- Next by Date: Zeilen zusammenfassen
- Previous by thread: Re: if then abfrage mit selection.find
- Next by thread: Konvertierung von Multiplan nach Excel
- Index(es):
Relevant Pages
|