outclassed
08-07-2007, 01:33 PM
Hi, Sorry if this is a bad question or improperly worded but its driving me insane.
Im trying to make a userform that has several input boxes, combo boxes, and checkboxes that then stores these values into an excel spreadsheet.
I tried linking the items in the userform to the cells in the excel sheet by matching the names of the cells in the excel sheet to the control sources of the items in the userform.
But it doesnt seem to work 100 percent. Some of the fields work great. Others will just not seem to work. I cant seem to figure out what the default values should be. Should I set values in the excel sheet before opening the userform? Should I set the value field in the userform for each control? Will this override the value already in the excel sheet?
IE,
I have a column in the userform of checkboxes. The name of the cells in an excel column each match the control source of a different checkbox in the userform. I want the user to see the userform, check some of the checkboxes and then have there value stored in the excel colum as true or false. The problem is I cant seem to get it to work, sometimes it does sometimes it doesnt. If I set several of the excel cells to True or False when I open the userform in the vba editor the changes are reflected so I know the cells are linked. But when i do userform.show and then make changes they are not always reflected in the excel sheet.
Do i need to set default values to the cells in the userform by modifiying the value field of each checkbox?
Do i need to have default values in the cells in the excel sheet or leave them blank?
Sometimes I even get crashes.
Sorry if this sounds confusing but its driving me nuts because I know my cells and controls are linked they just are working only part of the time. Is there some function to resync the cell in the excel file to the value in the userform when it is closed?
EDIT
Ok I think the thing that was messing me up was setting the values field inside of the userform controls. Values already in the spreadsheet seem to work fine.
Thanks for your time,
Drew.
Im trying to make a userform that has several input boxes, combo boxes, and checkboxes that then stores these values into an excel spreadsheet.
I tried linking the items in the userform to the cells in the excel sheet by matching the names of the cells in the excel sheet to the control sources of the items in the userform.
But it doesnt seem to work 100 percent. Some of the fields work great. Others will just not seem to work. I cant seem to figure out what the default values should be. Should I set values in the excel sheet before opening the userform? Should I set the value field in the userform for each control? Will this override the value already in the excel sheet?
IE,
I have a column in the userform of checkboxes. The name of the cells in an excel column each match the control source of a different checkbox in the userform. I want the user to see the userform, check some of the checkboxes and then have there value stored in the excel colum as true or false. The problem is I cant seem to get it to work, sometimes it does sometimes it doesnt. If I set several of the excel cells to True or False when I open the userform in the vba editor the changes are reflected so I know the cells are linked. But when i do userform.show and then make changes they are not always reflected in the excel sheet.
Do i need to set default values to the cells in the userform by modifiying the value field of each checkbox?
Do i need to have default values in the cells in the excel sheet or leave them blank?
Sometimes I even get crashes.
Sorry if this sounds confusing but its driving me nuts because I know my cells and controls are linked they just are working only part of the time. Is there some function to resync the cell in the excel file to the value in the userform when it is closed?
EDIT
Ok I think the thing that was messing me up was setting the values field inside of the userform controls. Values already in the spreadsheet seem to work fine.
Thanks for your time,
Drew.