I have a form and a button on that form.When the user clicks on the button an MS-Excel sheet is generated from MS-Sql Server 2005 and saved in a particular location.As this generation of excel tkes sometime to complete,what i want to do is i want to show a progressbar loading till the entire sheet is generated.
Showing the progress bar will help the user to understand that the generating of excel is under process.
Below My code to Save the File ExcelWorkSheetObject.SaveAs(ExcelSheetName) Below My Progressbar Code Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load ProgressBar1.Minimum = 0 ProgressBar1.Maximum = 10 ProgressBar1.Step = 1 End Sub Button1_Click() ProgressBar1.PerformStep() Sub
I cant set the Maximum property of the progress bar as the size of the excel sheet can vary.
What i want is till the excel sheet gets compelety generated the progress bar should be displayed.
To save the excel file it takes a prety long time.
Please guide where and how should i use the Progressbar to solve my issue