My Plus Sign Keeps Disappearing

Ed Song

Board Regular
Joined
Sep 1, 2014
Messages
90
I'm trying to add two variables together, but my plus sign keeps disappearing. My program looks like this:

Dim Unlim_H_Grp2 As Double
Dim SatH As Double
Dim IH_Grp2 As Double
Dim SatH As Double
Dim IH_Grp2 As Double
Dim DepRateH As Double
Dim Init_H_Grp2 As Double


If Unlim_H_Grp2 >= SatH Then
IH_Grp2 H_Subs_Grp2 = SatH - (1 - DepRateH) * Init_H_Grp2
H_Grp2 = SatH
Else
IH_Grp2 = IH_Grp2
H_Grp2 = Unlim_H_Grp2
End If

I want the second row, the first row underneath the If statement to read:

IH_Grp2 + H_Subs_Grp2 = SatH - (1 - DepRateH) * Init_H_Grp2

However, every time I insert the plus sign it disappears. If I run the program, I get an error "Expected, Sub, Function, or Property" message.

Any suggestions? Is my file corrupted? If so, what can I do to fix the problem?
 
I got the problem solved. My program is quite long. I initially had many If A > Z Then Y = Z +.... lines.

I wanted to change the statement to If A + B > Z Then Y = Z +....

when finishing the statement I have the habit of making a last click somewhere on the line. If I click at the end of the line the + disappears. If I click in the middle of the line, the + stays until I scroll down to the next line I want to change, which makes the prior line that was changed off the screen. When I clicked on the new line I wanted to change, the prior line was changed without me knowing it.

As for the four programs that worked, and the two that didn't work. I copy and pasted on the program that didn't work, but didn't copy and paste the programs that worked, forgetting over night that I hadn't made the changes to the four programs.
 
Last edited:
Upvote 0

Excel Facts

Test for Multiple Conditions in IF?
Use AND(test, test, test, test) or OR(test, test, test, ...) as the logical_test argument of IF.

Forum statistics

Threads
1,223,248
Messages
6,171,021
Members
452,374
Latest member
keccles

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