Microsoft Excel stops responding on Macro run

egrospe

Board Regular
Joined
Feb 10, 2016
Messages
54
Hello,

I have a userform that transfers a bunch of data to a sheet on a button click. My codes used to work perfectly before and recently, it's been giving me troubles on button click. Microsoft consistently stops responding.

For some odd reason, MS Excel Stops responding right when it's time to transfer the value entered in "txtgroupID" textbox to the sheet (see red text below). When I disable this line and try to run it, everything works fine. What am I missing?

Code:
Private Sub cmdsubmit_Click()
Sheets("Form").Unprotect Password:="password"

'CONTRACT INFO
Sheets("Form").Range("H4") = txtOPCProjectName.Value
Sheets("Email").Range("C1") = txtOPCProjectName.Value
Sheets("Form").Range("H5") = txtOPCProjectNumber.Value
Sheets("Email").Range("C2") = txtOPCProjectNumber.Value
Sheets("Form").Range("N9") = txtOPCProjectNumber.Value 
Sheets("Form").Range("P5") = txtID.Value
[COLOR=#ff0000][B]Sheets("Form").Range("H6") = txtGroupID.Value [/B][/COLOR]
Sheets("Email").Range("C3") = txtGroupID.Value 
    
Sheets("Form").Range("H7") = cmbReviewer.Value
    Sheets("Email").Range("C4") = cmbReviewer.Value
Sheets("Form").Range("H8") = txtDateReviewed.Value
    Sheets("Email").Range("C5") = txtDateReviewed.Value
Sheets("Form").Range("H9") = txtCCN.Value
    Sheets("Email").Range("C6") = txtCCN.Value
Sheets("Form").Range("H10") = cmbCT.Value
    Sheets("Email").Range("C7") = cmbCT.Value
Sheets("Form").Range("H11") = cmbCTN.Value
    Sheets("Email").Range("C8") = cmbCTN.Value
Sheets("Form").Range("H12") = cmbIT.Value
    Sheets("Email").Range("C9") = cmbIT.Value
Sheets("Form").Range("H13") = txtPN.Value
    Sheets("Email").Range("C10") = txtPN.Value
Sheets("Form").Range("H14") = txtECN.Value
    Sheets("Email").Range("C11") = txtECN.Value

End Sub

Thanks in advance!!

Emmanuel
 

Excel Facts

Create a Pivot Table on a Map
If your data has zip codes, postal codes, or city names, select the data and use Insert, 3D Map. (Found to right of chart icons).
hi

does H6 have any formula that will be updated when the new value arrives?
just wondering if the sheet calculation is causing you a slow down.

dave
 
Upvote 0
have you tried

Application.Calculation = xlCalculateManual

'''''''''''''''code

Application.Calculation = xlCalculateAutomatic

out of interest, i have used this allot.

Dave
 
Upvote 0
hi

does H6 have any formula that will be updated when the new value arrives?
just wondering if the sheet calculation is causing you a slow down.

dave

Hi Squidd,

I only have one cell that combines cells H5 and H6. Other than that, cell H6 is not updating any formulas.
 
Upvote 0
Hi

ok, its very strange, the code itself is not really doing much to go wrong

have you changed anything recently??

are any of the previous entries updaing formula

did you try the calculation manual automatic thing to iron out calculation issues.

Dave
 
Upvote 0

Forum statistics

Threads
1,214,545
Messages
6,120,132
Members
448,947
Latest member
test111

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