Skip to main content
update wording, add tags
Source Link

double clicclick on userform running slow excel vba

I have this code for picking items with multiple values from userform and insertinserting them tointo a sheet. The code works perfect on my computer, which is pretty decent. But in the oneon a computer from work it runs very slowly, maybe because I'm abusing the "select" method. I ran out of ideas.

Sub LSTART_DblClick(ByVal Cancel As MSForms.ReturnBoolean) 
    Application.ScreenUpdating = False
    On Error GoTo ERR1:
    L = LSTART.List(LSTART.ListIndex, 0)
    Sheets("CONCAT").Select
    Range("A2").Select

    While ActiveCell.Value <> "" And ActiveCell.Value <> Val(L) And ActiveCell.Value <> L
    ActiveCell.Offset(1, 0).Select
    Wend

    ActiveCell.Offset(0, 2).Select 
    CODART = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select   
    CODCLR = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select      
    TALLE = ActiveCell.Value

    Sheets("ventas").Select

    Range("B11").Select 

    While ActiveCell.Value <> ""
    ActiveCell.Offset(1, 0).Select 
    Wend                                
    
  ActiveCell.Value = CODART
  ActiveCell.Offset(0, 1).Value = CODCLR 
  ActiveCell.Offset(0, 2).Value = TALLE 
  ActiveCell.Offset(1, 0).Select 

ERR1:
Application.ScreenUpdating = True 

End Sub

double clic on userform running slow excel vba

I have this code for picking items with multiple values from userform and insert them to a sheet. The code works perfect on my computer, which is pretty decent. But in the one from work runs very slowly, maybe because I'm abusing the "select" method. I ran out of ideas

Sub LSTART_DblClick(ByVal Cancel As MSForms.ReturnBoolean) 
    Application.ScreenUpdating = False
    On Error GoTo ERR1:
    L = LSTART.List(LSTART.ListIndex, 0)
    Sheets("CONCAT").Select
    Range("A2").Select

    While ActiveCell.Value <> "" And ActiveCell.Value <> Val(L) And ActiveCell.Value <> L
    ActiveCell.Offset(1, 0).Select
    Wend

    ActiveCell.Offset(0, 2).Select 
    CODART = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select   
    CODCLR = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select      
    TALLE = ActiveCell.Value

    Sheets("ventas").Select

    Range("B11").Select 

    While ActiveCell.Value <> ""
    ActiveCell.Offset(1, 0).Select 
    Wend                                
    
  ActiveCell.Value = CODART
  ActiveCell.Offset(0, 1).Value = CODCLR 
  ActiveCell.Offset(0, 2).Value = TALLE 
  ActiveCell.Offset(1, 0).Select 

ERR1:
Application.ScreenUpdating = True 

End Sub

double click on userform running slow excel vba

I have this code for picking items with multiple values from userform and inserting them into a sheet. The code works perfect on my computer, which is pretty decent. But on a computer from work it runs very slowly, maybe because I'm abusing the "select" method. I ran out of ideas.

Sub LSTART_DblClick(ByVal Cancel As MSForms.ReturnBoolean) 
    Application.ScreenUpdating = False
    On Error GoTo ERR1:
    L = LSTART.List(LSTART.ListIndex, 0)
    Sheets("CONCAT").Select
    Range("A2").Select

    While ActiveCell.Value <> "" And ActiveCell.Value <> Val(L) And ActiveCell.Value <> L
    ActiveCell.Offset(1, 0).Select
    Wend

    ActiveCell.Offset(0, 2).Select 
    CODART = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select   
    CODCLR = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select      
    TALLE = ActiveCell.Value

    Sheets("ventas").Select

    Range("B11").Select 

    While ActiveCell.Value <> ""
    ActiveCell.Offset(1, 0).Select 
    Wend                                
    
  ActiveCell.Value = CODART
  ActiveCell.Offset(0, 1).Value = CODCLR 
  ActiveCell.Offset(0, 2).Value = TALLE 
  ActiveCell.Offset(1, 0).Select 

ERR1:
Application.ScreenUpdating = True 

End Sub
Source Link

double clic on userform running slow excel vba

I have this code for picking items with multiple values from userform and insert them to a sheet. The code works perfect on my computer, which is pretty decent. But in the one from work runs very slowly, maybe because I'm abusing the "select" method. I ran out of ideas

Sub LSTART_DblClick(ByVal Cancel As MSForms.ReturnBoolean) 
    Application.ScreenUpdating = False
    On Error GoTo ERR1:
    L = LSTART.List(LSTART.ListIndex, 0)
    Sheets("CONCAT").Select
    Range("A2").Select

    While ActiveCell.Value <> "" And ActiveCell.Value <> Val(L) And ActiveCell.Value <> L
    ActiveCell.Offset(1, 0).Select
    Wend

    ActiveCell.Offset(0, 2).Select 
    CODART = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select   
    CODCLR = ActiveCell.Value

    ActiveCell.Offset(0, 1).Select      
    TALLE = ActiveCell.Value

    Sheets("ventas").Select

    Range("B11").Select 

    While ActiveCell.Value <> ""
    ActiveCell.Offset(1, 0).Select 
    Wend                                
    
  ActiveCell.Value = CODART
  ActiveCell.Offset(0, 1).Value = CODCLR 
  ActiveCell.Offset(0, 2).Value = TALLE 
  ActiveCell.Offset(1, 0).Select 

ERR1:
Application.ScreenUpdating = True 

End Sub