Dim lngNumNights As Long
Dim lngNumSharedNights As Long
Dim curInitCost as currency
dim curFullCost as Currency
Dim curSharedCost as Currency
dim curCost as Currency
'Let's break it down.
'First get the total number of nights
lngNumNights = val(cmbNights.Text)
'Now Get the Number of Shared Nights
lngNumSharedNights= Val(txtShare.Text)
'Now figure how many were not shared (this is the full price nights)
lngNumNights = lngNumNights - lngNumSharedNights
'Get the initial cost price
curInitCost = ccur(txtInitialCost.Text)
'Ok, so now let's calc the cost of full price nights
curFullCost = lngNumNights * curInitCost
'Now calculate the cost of the shared nights
curSharedCost = lngNumSharedNights * (curInitCost / 2)
'Now we have the cost of shared nights and full nights. Add them together
curCost = curFullCost + curSharedCost
txtCost = format$(curCost, "Currency")