après avoir eu plusieurs renseignements sur la création d'une macro
permettant la recherche d'une donnée dans plusieurs feuilles (merci a joel)
j'ai un peu modifié la macro mais très légèrement.
par contre quand je l'exécute rien ne se passe je pensais qu'une boite de
dialogue apparaîtrais mais la rien dois je créer un useform?
merci de votre aide
Sub VaChercher()
'
Dim Quoi As String
Dim oSheet As Worksheet
Quoi = "jojo"
For Each oSheet In Worksheets
oSheet.Select
If Not Cells.Find(What:=Quoi, After:=Range("A1"), LookIn:=xlFormulas) Is
Nothing Then
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False) _
Is Nothing Then
MsgBox oSheet.Name & " - " & Cells.Find(What:=Quoi, After:=ActiveCell,
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:=False) _
.Address
Exit For
End If
Next
Ca va t'y mieux ? -- Amicales Salutations XL 97 / 2000 / 2002 Préférez suivre facilement sur le forum : news://msnews.microsoft.com/microsoft.public.fr.excel (Voulez-vous vous abonner ? -> Oui)
"e.platet" a écrit dans le message de news:
après avoir eu plusieurs renseignements sur la création d'une macro permettant la recherche d'une donnée dans plusieurs feuilles (merci a joel) j'ai un peu modifié la macro mais très légèrement. par contre quand je l'exécute rien ne se passe je pensais qu'une boite de dialogue apparaîtrais mais la rien dois je créer un useform?
merci de votre aide
Sub VaChercher() ' Dim Quoi As String Dim oSheet As Worksheet Quoi = "jojo"
For Each oSheet In Worksheets oSheet.Select If Not Cells.Find(What:=Quoi, After:=Range("A1"), LookIn:=xlFormulas) Is Nothing Then
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:úlse) _ Is Nothing Then MsgBox oSheet.Name & " - " & Cells.Find(What:=Quoi, After:¬tiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:úlse) _ .Address Exit For End If Next
Ca va t'y mieux ?
--
Amicales Salutations
XL 97 / 2000 / 2002
Préférez suivre facilement sur le forum :
news://msnews.microsoft.com/microsoft.public.fr.excel
(Voulez-vous vous abonner ? -> Oui)
"e.platet" <e.platet@wanadoo.fr> a écrit dans le message de news:
Ot7Yucu4EHA.1976@TK2MSFTNGP09.phx.gbl...
après avoir eu plusieurs renseignements sur la création d'une macro permettant la recherche d'une
donnée dans plusieurs feuilles (merci a joel) j'ai un peu modifié la macro mais très légèrement.
par contre quand je l'exécute rien ne se passe je pensais qu'une boite de dialogue apparaîtrais mais
la rien dois je créer un useform?
merci de votre aide
Sub VaChercher()
'
Dim Quoi As String
Dim oSheet As Worksheet
Quoi = "jojo"
For Each oSheet In Worksheets
oSheet.Select
If Not Cells.Find(What:=Quoi, After:=Range("A1"), LookIn:=xlFormulas) Is Nothing Then
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:úlse) _
Is Nothing Then
MsgBox oSheet.Name & " - " & Cells.Find(What:=Quoi, After:¬tiveCell,
LookIn:=xlFormulas, LookAt:= _
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext,
MatchCase:úlse) _
.Address
Exit For
End If
Next
Ca va t'y mieux ? -- Amicales Salutations XL 97 / 2000 / 2002 Préférez suivre facilement sur le forum : news://msnews.microsoft.com/microsoft.public.fr.excel (Voulez-vous vous abonner ? -> Oui)
"e.platet" a écrit dans le message de news:
après avoir eu plusieurs renseignements sur la création d'une macro permettant la recherche d'une donnée dans plusieurs feuilles (merci a joel) j'ai un peu modifié la macro mais très légèrement. par contre quand je l'exécute rien ne se passe je pensais qu'une boite de dialogue apparaîtrais mais la rien dois je créer un useform?
merci de votre aide
Sub VaChercher() ' Dim Quoi As String Dim oSheet As Worksheet Quoi = "jojo"
For Each oSheet In Worksheets oSheet.Select If Not Cells.Find(What:=Quoi, After:=Range("A1"), LookIn:=xlFormulas) Is Nothing Then
xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:úlse) _ Is Nothing Then MsgBox oSheet.Name & " - " & Cells.Find(What:=Quoi, After:¬tiveCell, LookIn:=xlFormulas, LookAt:= _ xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:úlse) _ .Address Exit For End If Next