snoble
asked on
Combo Box - VBA to modify ListWidth
I am trying to manipulate a combox of a form given if Assem is True/False. I finally got the ColumnWidths to work with inserting the Chr(35) charater ( " ), but the ListWidth doesn't want to cooperate with me. The list width won't change no matter what I am doing. It defaults to the width of the combox box and if I tried to insert the Chr(34) but I get an error message saying this property only accepts a number. Any ideas on how to alter the ListWidth Property?
If Assem = True Then
Forms![frmPrintJob]![RptCr iteria].Co lumnHeads = True
Forms![frmPrintJob]![RptCr iteria].Co lumnCount = 2
Forms![frmPrintJob]![RptCr iteria].Co lumnWidths = 0.7 & Chr(34) & ";" & 2.3 & Chr(34)
Forms![frmPrintJob]![RptCr iteria].Li stWidth = 3 <---- Won't alter the List Width
Else
Forms![frmPrintJob]![RptCr iteria].Co lumnHeads = False
Forms![frmPrintJob]![RptCr iteria].Co lumnCount = 1
Forms![frmPrintJob]![RptCr iteria].Co lumnWidths = 1
Forms![frmPrintJob]![RptCr iteria].Li stWidth = 1
End If
If Assem = True Then
Forms![frmPrintJob]![RptCr
Forms![frmPrintJob]![RptCr
Forms![frmPrintJob]![RptCr
Forms![frmPrintJob]![RptCr
Else
Forms![frmPrintJob]![RptCr
Forms![frmPrintJob]![RptCr
Forms![frmPrintJob]![RptCr
Forms![frmPrintJob]![RptCr
End If
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks for the info. I am using the Chr(34) on the column widths and that seems to be working fine. I did discover the List Width was obviously not using inches by default by playing around. Thanks for the info.... issue is resolved. Thanks.
Stephen