Ivan,
This is the correct code. I changes the name at one point hoping it would help, but it made no difference. The only other code in this module is triggered when a control button is pressed:
Private Sub AddPlantBtn_Click()
Application.ScreenUpdating = False
' Finds the next available row for data entry
Range("PlantHome").Select
If (ActiveCell.Offset(1, 0).Text = "") Then
ActiveCell.Offset(1, 0).Range("A1").Select
Else
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
End If
Worksheets("Plants").CBox_Plants.LinkedCell = ActiveCell.Address
'Opens the Plant Combo Box
Worksheets("Plants").CBox_Plants.Visible = True
End Sub
I also have another module of similar code "Sheet2(Services)":
Sub CBox_Other_Click()
'Sets up the row for lookup of Plant Data
TargetCell = ActiveCell.Address
' Checks to see if 'Installation of Plant Material' is selected
If CBox_Other.Text = "Installation of Plant Material" Then
' Enters the Extended Price based on .65% of plant cost
Application.Goto Reference:="InstallFunction"
Selection.Copy
Application.Goto Reference:=Worksheets("Services").Range(TargetCell), Scroll:=False
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveSheet.Paste
Else
' Enters the Unit Price
Application.Goto Reference:="OtherPriceFunction"
Selection.Copy
Application.Goto Reference:=Worksheets("Services").Range(TargetCell), Scroll:=False
ActiveCell.Offset(0, 2).Range("A1").Select
ActiveSheet.Paste
' Enters the Extended Price formula
Application.Goto Reference:="ServPriceFormula"
Selection.Copy
Application.Goto Reference:=Worksheets("Services").Range(TargetCell), Scroll:=False
ActiveCell.Offset(0, 3).Range("A1").Select
ActiveSheet.Paste
End If
' Enter 'Labor' as the SKU
Application.Goto Reference:=Worksheets("Services").Range(TargetCell), Scroll:=False
ActiveCell.Offset(0, -1).Range("A1").Select
'ActiveCell.Text = "LABOR"
' Format the Price Cells
Columns("E:F").Select
Selection.NumberFormat = "$0.00"
Application.ScreenUpdating = True
' Moves the screen to the beginning and selects the quantity cell
Range("OtherHomeCell").Select
Application.Goto Reference:=Worksheets("Services").Range(TargetCell), Scroll:=False
ActiveCell.Offset(0, 1).Range("A1").Select
Worksheets("Services").CBox_Other.Visible = False
End Sub
I tried modifying the code to "clean it up" and eliminate the need for the macro to copy certain cells and, instead, write the function or formula into the cell, but the problem still exists?????
I'm baffled!
Thanks, ~Dave