GerryZ
Well-known Member
- Joined
- Jul 4, 2014
- Messages
- 1,224
- Office Version
- 365
- Platform
- Windows
Hello Friends
I'm learning VBA
I am trying to print on the screen the result of 2 nested Loops with the Do Loop, the code I created with some difficulty manages to print only the name of the WorkBook but it does not print the sheets names , maybe I make some mistakes
If anyone can help me
A greeting
EDIT I've the OutPut in another sheet
I'm learning VBA
I am trying to print on the screen the result of 2 nested Loops with the Do Loop, the code I created with some difficulty manages to print only the name of the WorkBook but it does not print the sheets names , maybe I make some mistakes
If anyone can help me
A greeting
VBA Code:
Option Explicit
Sub UnisciTuttiIFile()
Dim NomiFile As String
NomiFile = Dir("C:\Users\Utente\Documents\Vendite\Anni\")
Do Until NomiFile = ""
Debug.Print NomiFile
Do
Debug.Print ActiveSheet.Name
If ActiveSheet.Next Is Nothing Then Exit Do
Loop
NomiFile = Dir
Loop
End Sub
EDIT I've the OutPut in another sheet