Click here to Skip to main content
15,886,071 members
Home / Discussions / Visual Basic
   

Visual Basic

 
AnswerRe: Need help with this question Pin
OriginalGriff6-Sep-21 19:44
mveOriginalGriff6-Sep-21 19:44 
QuestionText box auto takes serial no when items select form combo box Pin
GOBIND KUMAR SHARMA31-Aug-21 23:48
GOBIND KUMAR SHARMA31-Aug-21 23:48 
Rant[REPOST] Text box auto takes serial no when items select form combo box Pin
Richard Deeming1-Sep-21 0:06
mveRichard Deeming1-Sep-21 0:06 
QuestionWhat is the problem here? Pin
Member 1495490331-Aug-21 9:59
Member 1495490331-Aug-21 9:59 
AnswerRe: What is the problem here? Pin
Richard MacCutchan31-Aug-21 21:57
mveRichard MacCutchan31-Aug-21 21:57 
GeneralRe: What is the problem here? Pin
Richard Deeming31-Aug-21 22:50
mveRichard Deeming31-Aug-21 22:50 
QuestionHow to faster process export to excel row by row with excel formating Pin
Anton Setiawan 202124-Aug-21 18:33
Anton Setiawan 202124-Aug-21 18:33 
AnswerRe: How to faster process export to excel row by row with excel formating Pin
Richard Deeming24-Aug-21 21:37
mveRichard Deeming24-Aug-21 21:37 
You need to profile your code to find out where the bottleneck is before you can start fixing it. Just dumping 669 lines of unexplained code in a message and expecting us to profile it for you isn't going to work - especially since we don't have access to your database. And since you can't be bothered to remove irrelevant code, such as the unused DelayMSC function, you clearly don't care about helping us to help you.

For a start, look at your queries. If your outer query returns 2000 rows, you will be executing 2001 queries to load the data, since you execute a separate query for every row in the "header data" query. There will almost certainly be a way to combine the queries so that you only need to execute one.

You have multiple calls to the Delay function, which will delay your code by more than 10ms each time you call it.

You're calling Application.DoEvents, which is always a code-smell. It indicates that you're doing work on the UI thread which should actually be performed on a background thread using a BackgroundWorker[^] or similar.

Also, Office Interop can be quite slow. You might have better luck using the Open XML SDK[^] to generate the file instead.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

QuestionBlank/Black webcam on newer model laptop running webcam program in VB.net Pin
nethelp1116-Aug-21 16:47
professionalnethelp1116-Aug-21 16:47 
AnswerRe: Blank/Black webcam on newer model laptop running webcam program in VB.net Pin
Richard MacCutchan16-Aug-21 21:46
mveRichard MacCutchan16-Aug-21 21:46 
AnswerRe: Blank/Black webcam on newer model laptop running webcam program in VB.net Pin
Eddy Vluggen17-Aug-21 1:38
professionalEddy Vluggen17-Aug-21 1:38 
QuestionOdd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 4:02
Peter R. Fletcher6-Aug-21 4:02 
AnswerRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak6-Aug-21 5:02
mveDave Kreskowiak6-Aug-21 5:02 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 5:49
Peter R. Fletcher6-Aug-21 5:49 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak6-Aug-21 6:16
mveDave Kreskowiak6-Aug-21 6:16 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 6:31
Peter R. Fletcher6-Aug-21 6:31 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 8:27
Peter R. Fletcher6-Aug-21 8:27 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak6-Aug-21 13:25
mveDave Kreskowiak6-Aug-21 13:25 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher7-Aug-21 3:45
Peter R. Fletcher7-Aug-21 3:45 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak7-Aug-21 5:14
mveDave Kreskowiak7-Aug-21 5:14 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher7-Aug-21 9:10
Peter R. Fletcher7-Aug-21 9:10 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Dave Kreskowiak7-Aug-21 9:40
mveDave Kreskowiak7-Aug-21 9:40 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher7-Aug-21 9:59
Peter R. Fletcher7-Aug-21 9:59 
AnswerRe: Odd Transparency behavior in VB.Net Panel Pin
Gerry Schmitz6-Aug-21 6:52
mveGerry Schmitz6-Aug-21 6:52 
GeneralRe: Odd Transparency behavior in VB.Net Panel Pin
Peter R. Fletcher6-Aug-21 8:14
Peter R. Fletcher6-Aug-21 8:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.