mysticmario
Active Member
- Joined
- Nov 10, 2021
- Messages
- 323
- Office Version
- 365
- Platform
- Windows
Any has an idea why this occurs?
VBA Code:
Private Sub bezb_Click()
Dim narzutr As String
Dim narzutm As String
Dim wName As String
Dim pName As String
Dim cell As Range
Dim fname As String, wb As Workbook, project As String
narzutr = 1.15
pName = Range("C3").Value
wName = "Faktury" + Left(pName, 5)
fname = Application.GetOpenFilename("Excel Files (*.xl*), *.xl*")
Set wb = Workbooks.Open(fname)
For Each sh In wb.Sheets
If Application.CountA(sh.Cells) > 0 Then
sh.Copy After:=ThisWorkbook.Sheets(Sheets.Count)
End If
Exit For
Next
Application.DisplayAlerts = False
wb.Close True
Application.DisplayAlerts = True