helping scaling down small code...

buzz71023

Active Member
Joined
May 29, 2011
Messages
295
Office Version
  1. 2016
Platform
  1. Windows
If anyone has any recommendations that might make this a little smaller, I would appreciate it. Its not that slow or long but every little bit will helps.

Application.ScreenUpdating = False
Sheets("Test Sheet").Select
Range("Ash3Freq").Value = ComboBox1.Value
Range("Ash3Trgt").Value = TextBox1.Value
Range("Ash3Hi").Value = TextBox2.Value
Range("Ash3Low").Value = TextBox3.Value
Sheets("Test Sheet").Select
Columns("D:D").Select
Selection.Copy
Sheets("Data Sheet").Select
Columns("I:I").Select
Selection.Insert Shift:=xlToRight
Range("I7").Select
Sheets("Test Sheet").Select
Range("D8:D11").ClearContents
Sheets("Data Sheet").Select
Range("C2, C2").Select
Application.ScreenUpdating = True

Unload Me
 

Excel Facts

How to find 2nd largest value in a column?
MAX finds the largest value. =LARGE(A:A,2) will find the second largest. =SMALL(A:A,3) will find the third smallest
Code:
    Application.ScreenUpdating = False
    
    With Sheets("Test Sheet")
        .Range("Ash3Freq").Value = ComboBox1.Value
        .Range("Ash3Trgt").Value = TextBox1.Value
        .Range("Ash3Hi").Value = TextBox2.Value
        .Range("Ash3Low").Value = TextBox3.Value
    End With
    
    Sheets("Test Sheet").Columns("D:D").Copy
    Sheets("Data Sheet").Columns("I:I").Insert Shift:=xlToRight
    Sheets("Test Sheet").Range("D8:D11").ClearContents
    
    Application.Goto Reference:=Worksheets("Data Sheet").Range("C2")
    
    Application.ScreenUpdating = True
    
    Unload Me
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,788
Messages
6,121,580
Members
449,039
Latest member
Arbind kumar

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top