Hey guys, I am back again with some more questions...
and I thank everyone for all the help they have offered.
I have a sub routine (named MakeMyReport), for the most part, it just calls other subs to step through the whole process of making this crazy report.
I added a section that checks if there were results from a filter, if not it exits sub. bla bla bla
What I am trying to figure out, and I am not the best at doing all this... still learning, I am wanting to add a progress bar to show the progress as it goes through the routine.
I made a userform and all that, but I am having trouble incorporating it into this sub, as when I thought I had it (from many, many searches) all it would do is show a full bar and hang until i closed the userform window...
I will include the current code that I have, which everything works, just no progress bar.
The only reason that I am looking to add a progress bar is that at a certain point when it is retrieving data from other workbooks on teh network, it sometimes hangs and takes a while... so this way it would let the user know something is going on.
and the dang progress bars, for some silly reason, I just cannot wrap my head around!!! dang it!!
oh.. and please don't beat me up too much on what I have written.. I am still a novice...
Sub MakeMyReport()
' This starts the generation of the report based on the date range entered into the "Main" tab
Application.ScreenUpdating = False
Sheets("PreReport").Visible = True
Sheets("PreReport2").Visible = True
Sheets("PreReport3").Visible = True
Sheets("Report").Visible = True
Sheets("Results").Visible = True
Sheets("PreReport2").Activate
Rows("2:" & Rows.Count).ClearContents
Call FilterMyData
Call CopyMyColumns
Call EnterMyTotals
Call EnterMyFormulas
Call GetMyRunTimes
Call FilterMyData2
' This section checks to see if any data was pasted to the sheet, if none it will terminate the Macro
Sheets("PreReport2").Activate
With ActiveSheet
If Len(.Range("A2")) = 0 Then
MsgBox "No Data Found for Date Range Selected, Try Again."
Sheets("PreReport").Visible = xlVeryHidden
Sheets("PreReport2").Visible = xlVeryHidden
Sheets("PreReport3").Visible = xlVeryHidden
Sheets("Report").Visible = xlVeryHidden
Sheets("Results").Visible = xlVeryHidden
Sheets("Main").Activate
Exit Sub
End If
End With
' Continues with generating the report if data was found
Call CopyMyColumns2
Sheets("Report").Activate
Rows("3:" & Rows.Count).ClearContents
Sheets("PreReport3").Select
Range("A2").Select
Range(Selection, Selection.End(xlToRight)).Select
Range(Selection, Selection.End(xlDown)).Select
Selection.Copy
Sheets("Report").Activate
Range("A3").Select
ActiveSheet.Paste
Call ChartFormats
Call BoldMySections
Call FormatReportColumns1
Call ConvertToTable
Application.CutCopyMode = False ' clears any remaining content on clipboard
Sheets("Main").Activate
Range("A6").Select
ActiveWorkbook.RefreshAll
Call CopyMyPivot2
Call CopyMyPivot3
Call MakeChart3
Sheets("Main").Activate
Range("B1").Select
ActiveWorkbook.RefreshAll
' Makes the Picture for the chart area
Call AddPicture1
Sheets("Main").Activate
Range("B1").Select
MsgBox "Report has Been Generated"
End Sub
and thank you for any advice and/or help!!!
Bookmarks