Formating the text form here http://www.vbforums.com/showthread.php?t=403805 to (LOOK IN THE ATTACHMENTS) look like the one in Test.txt thanks. :thumb:
Printable View
Formating the text form here http://www.vbforums.com/showthread.php?t=403805 to (LOOK IN THE ATTACHMENTS) look like the one in Test.txt thanks. :thumb:
Here is code you need to modify in your previous code:VB Code:
Private Sub UserForm_Activate() Dim strFilter As String Dim lngFlags As Long Dim dlgOpen As FileDialog Dim strTxtFile As String Dim iFile Dim strTemp As String strFilter = ahtAddFilterItem(strFilter, "Text Files (*.txt)", "*.TXT") strFilter = ahtAddFilterItem(strFilter, "All Files (*.*)", "*.*") Set dlgOpen = Application.FileDialog(Type:=msoFileDialogOpen) strTxtFile = ahtCommonFileOpenSave(InitialDir:="C:\", Filter:=strFilter, FilterIndex:=3, Flags:=lngFlags, DialogTitle:="Save the Txt file As") With dlgOpen .AllowMultiSelect = True If .Show = -1 Then 'Add headers Call WriteTextFileContents("[Name:,File Size:,Number of Slide(s) Found:,Number of WordArt(s) found:,Number of TextBox found(s):," _ & "Number of Picture(s) found:,Number of AutoShape(s) found:,Number of Sound(s) & Video(s) file found:," _ & "Number of Diagram(s) found:,and Number of Chart(s) found:]" & vbCrLf, strTxtFile, True) 'if the user press the Open button For Each iFile In .SelectedItems ProgressBar1.Value = ProgressBar1.Value + (50 / .SelectedItems.Count) 'To open the file Presentations.Open iFile 'Add the file Name strTemp = iFile & "," 'Call WriteTextFileContents(iFile & vbCrLf, strTxtFile, True) 'Count the number of slides and store it in text file 'remove comma at the end if not needed. strTemp = strTemp & Presentations(iFile).Slides.Count & "," 'Call WriteTextFileContents(Presentations(iFile).Slides.Count & vbCrLf, strTxtFile, True) 'No. of pictures ... 'No. of sound ... 'No. of video ... 'etc. 'finally write everything in a text file Call WriteTextFileContents(strTemp, strTxtFile, True) 'To close the file Presentations(iFile).Close ProgressBar1.Value = ProgressBar1.Value + (50 / .SelectedItems.Count) Next End If End With 'End Sub ExitHere: MsgBox "Process Completed." Unload Me End Sub
Thanks a lot C man but where do I put it and how can I add a percentage to the progress bar, thanks again.
you need to replace the similar code which i gave you last time
percentage?????
Do you mean numbers or something else?
How come the ProgressBar doesn't work and how do I add number to the ProgressBar like percentage, also how come the Calculations is wrong. Here is the attachment that contains the code. Thanks a lot. :wave:Quote:
Originally Posted by cssriraman
Thanks, C-MAN :wave: