Hirdetés
- sziku69: Fűzzük össze a szavakat :)
- Luck Dragon: Asszociációs játék. :)
- Geri Bátyó: Agglegénykonyha 14 – Kések, késélezés
- Sub-ZeRo: Euro Truck Simulator 2 & American Truck Simulator 1 (esetleg 2 majd, ha lesz) :)
- gban: Ingyen kellene, de tegnapra
- D1Rect: Nagy "hülyétkapokazapróktól" topik
- Luck Dragon: MárkaLánc
- sziku69: Szólánc.
- bobalazs: i5 4690 + RX 460 HTPC
- Brogyi: CTEK akkumulátor töltő és másolatai
-
LOGOUT
A Microsoft Excel topic célja segítséget kérni és nyújtani Excellel kapcsolatos problémákra.
Kérdés felvetése előtt olvasd el, ha még nem tetted.
Új hozzászólás Aktív témák
-
p5quser
tag
válasz
Fferi50
#37664
üzenetére
Sub SearchFolders()
'UpdatebyKutoolsforExcel20151202
Dim xFso As Object
Dim xFld As Object
Dim xStrSearch As String
Dim xStrPath As String
Dim xStrFile As String
Dim xOut As Worksheet
Dim xWb As Workbook
Dim xWk As Worksheet
Dim xRow As Long
Dim xFound As Range
Dim xStrAddress As String
Dim xFileDialog As FileDialog
Dim xUpdate As Boolean
Dim xCount As Long
On Error GoTo ErrHandler
Set xFileDialog = Application.FileDialog(msoFileDialogFolderPicker)
xFileDialog.AllowMultiSelect = False
xFileDialog.Title = "Select a forlder"
If xFileDialog.Show = -1 Then
xStrPath = xFileDialog.SelectedItems(1)
End If
If xStrPath = "" Then Exit Sub
xStrSearch = "KTE"
xUpdate = Application.ScreenUpdating
Application.ScreenUpdating = False
Set xOut = Worksheets.Add
xRow = 1
With xOut
.Cells(xRow, 1) = "Workbook"
.Cells(xRow, 2) = "Worksheet"
.Cells(xRow, 3) = "Cell"
.Cells(xRow, 4) = "Text in Cell"
Set xFso = CreateObject("Scripting.FileSystemObject")
Set xFld = xFso.GetFolder(xStrPath)
xStrFile = Dir(xStrPath & "\*.xls*")
Do While xStrFile <> ""
Set xWb = Workbooks.Open(Filename:=xStrPath & "\" & xStrFile, UpdateLinks:=0, ReadOnly:=True, AddToMRU:=False)
For Each xWk In xWb.Worksheets
Set xFound = xWk.UsedRange.Find(xStrSearch)
If Not xFound Is Nothing Then
xStrAddress = xFound.Address
End If
Do
If xFound Is Nothing Then
Exit Do
Else
xCount = xCount + 1
xRow = xRow + 1
.Cells(xRow, 1) = xWb.Name
.Cells(xRow, 2) = xWk.Name
.Cells(xRow, 3) = xFound.Address
.Cells(xRow, 4) = xFound.Value
End If
Set xFound = xWk.Cells.FindNext(After:=xFound)
Loop While xStrAddress <> xFound.Address
Next
xWb.Close (False)
xStrFile = Dir
Loop
.Columns("A:D").EntireColumn.AutoFit
End With
MsgBox xCount & "cells have been found", , "Kutools for Excel"
ExitHandler:
Set xOut = Nothing
Set xWk = Nothing
Set xWb = Nothing
Set xFld = Nothing
Set xFso = Nothing
Application.ScreenUpdating = xUpdate
Exit Sub
ErrHandler:
MsgBox Err.Description, vbExclamation
Resume ExitHandler
End SubEbből a szösszenetből lett plasztikázva.
Köszönöm a segítséget!
Új hozzászólás Aktív témák
- exHWSW - Értünk mindenhez IS
- Anglia - élmények, tapasztalatok
- Wise (ex-TransferWise)
- Revolut
- Hegesztés topic
- AMD vs. INTEL vs. NVIDIA
- PlayStation 5
- Steam, GOG, Epic Store, Humble Store, Xbox PC Game Pass, Origin Access, uPlay+, Apple Arcade felhasználók barátságos izgulós topikja
- Amerika kész lemondani a kormányról
- ASUS blog: 2K-tól a 4K-ig és tovább a Radeon RX 9000-es szériával
- További aktív témák...
- AKCIÓ! ASRock A520M R5 5500 16GB DDR4 512GB SSD RTX 2060 Super 8GB Rampage SHIVA Adata 600W
- Lenovo ThinkStation P300 Workstation,i7-4790,8GB DDR3,500GB SATA3 HDD,2GB VGA,WIN11
- ÁRGARANCIA!Épített KomPhone i5 10400F 16/32/64GB RAM RTX 3060 12GB GAMER PC termékbeszámítással
- 271 - Lenovo Yoga Pro 9 (16IAH10) - Intel Core U9 285H, RTX 5070
- AKCIÓ! LENOVO ThinkPad P15 Gen 1 munkaállomás - i7 10850H 16GB DDR4 256GB SSD Quadro T2000 W11
Állásajánlatok
Cég: Laptopműhely Bt.
Város: Budapest

