Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
form population macro
I have a dilema, I have one form that is filled out with basic info that
needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks |
#2
Posted to microsoft.public.excel.programming
|
|||
|
|||
form population macro
It is hard to give you additional information. It seems that you know how to
generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks |
#3
Posted to microsoft.public.excel.programming
|
|||
|
|||
form population macro
Well, I have the vba form done, but don't know how to call it into the excel
spreadsheet. That's probably the simplest thing to do, I know, but I've been away from this for a long time. The other problem I'm having is I have a drop down list for credit cards, that chooses, Visa, AE ...etc. and I want to have the entry cell change if it is visa, or american express, since they have different amounts of digits, and to confirm that they have entered the correct amount of digits. I have the custom formating now for visa, but it will not work for american express. Sorry to be so dense on this. :( "Joel" wrote: It is hard to give you additional information. It seems that you know how to generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks |
#4
Posted to microsoft.public.excel.programming
|
|||
|
|||
form population macro
Pam: I answer the qustion below in the row with the dashed lines (2 places).
Well, I have the vba form done, but don't know how to call it into the excel spreadsheet. That's probably the simplest thing to do, I know, but I've been away from this for a long time. -------------------------------------------------- The VBA userform from a macro is called by userform1.Listbox1.clear userform1.show The listbox will keep previous contants so you need to clear it before you open it. You can change the name in VBA by going to view menu adding property window to VBA. then in the Project window select form - userform1. Changing name to Creditform will then change the name in VBA to CredFrom.show. You may also want to change the caption. ----------------------------------------------------- The other problem I'm having is I have a drop down list for credit cards, that chooses, Visa, AE ...etc. and I want to have the entry cell change if it is visa, or american express, since they have different amounts of digits, and to confirm that they have entered the correct amount of digits. I have the custom formating now for visa, but it will not work for american express. Sorry to be so dense on this. :( -------------------------------------------------------- I having trouble figuring out what you are doing. The same things can be done in both VBA code and in the spreadsheet and the answer will be completely different depending on which method is used. Sometimes there is multiple way of doing things in both. I think you are using for the drop down list Data Validation List. Not sure why custom formating will not work on a spreadsheet (you may be using a different method). A spreadsheet from will accept any number of characters or digits? If you are using a data validation you can set the number of digits to between and make it the length between both numbers. Sorry If I'm not understanding which methods you are using. -------------------------------------------------------- "Joel" wrote: It is hard to give you additional information. It seems that you know how to generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks "Pam" wrote: Well, I have the vba form done, but don't know how to call it into the excel spreadsheet. That's probably the simplest thing to do, I know, but I've been away from this for a long time. The other problem I'm having is I have a drop down list for credit cards, that chooses, Visa, AE ...etc. and I want to have the entry cell change if it is visa, or american express, since they have different amounts of digits, and to confirm that they have entered the correct amount of digits. I have the custom formating now for visa, but it will not work for american express. Sorry to be so dense on this. :( "Joel" wrote: It is hard to give you additional information. It seems that you know how to generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks |
#5
Posted to microsoft.public.excel.programming
|
|||
|
|||
form population macro
Thanks Joel,
I'll try to be clearer on the credit card number issue. I think I need to use an if statement. I want it to be if, visa/mastercard then 16 digits, if american express then 15 digits. but since I'm using a drop down list for the choices of visa, mastercard, discover or american express I can't get an if statement to work because it comes up with an error? "Joel" wrote: Pam: I answer the qustion below in the row with the dashed lines (2 places). Well, I have the vba form done, but don't know how to call it into the excel spreadsheet. That's probably the simplest thing to do, I know, but I've been away from this for a long time. -------------------------------------------------- The VBA userform from a macro is called by userform1.Listbox1.clear userform1.show The listbox will keep previous contants so you need to clear it before you open it. You can change the name in VBA by going to view menu adding property window to VBA. then in the Project window select form - userform1. Changing name to Creditform will then change the name in VBA to CredFrom.show. You may also want to change the caption. ----------------------------------------------------- The other problem I'm having is I have a drop down list for credit cards, that chooses, Visa, AE ...etc. and I want to have the entry cell change if it is visa, or american express, since they have different amounts of digits, and to confirm that they have entered the correct amount of digits. I have the custom formating now for visa, but it will not work for american express. Sorry to be so dense on this. :( -------------------------------------------------------- I having trouble figuring out what you are doing. The same things can be done in both VBA code and in the spreadsheet and the answer will be completely different depending on which method is used. Sometimes there is multiple way of doing things in both. I think you are using for the drop down list Data Validation List. Not sure why custom formating will not work on a spreadsheet (you may be using a different method). A spreadsheet from will accept any number of characters or digits? If you are using a data validation you can set the number of digits to between and make it the length between both numbers. Sorry If I'm not understanding which methods you are using. -------------------------------------------------------- "Joel" wrote: It is hard to give you additional information. It seems that you know how to generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks "Pam" wrote: Well, I have the vba form done, but don't know how to call it into the excel spreadsheet. That's probably the simplest thing to do, I know, but I've been away from this for a long time. The other problem I'm having is I have a drop down list for credit cards, that chooses, Visa, AE ...etc. and I want to have the entry cell change if it is visa, or american express, since they have different amounts of digits, and to confirm that they have entered the correct amount of digits. I have the custom formating now for visa, but it will not work for american express. Sorry to be so dense on this. :( "Joel" wrote: It is hard to give you additional information. It seems that you know how to generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks |
#6
Posted to microsoft.public.excel.programming
|
|||
|
|||
form population macro
I posted a response about 1 hour ago and haven't seen the listing. Here is
my response It is better if you split a complicated IF stateemnt into smaller pieces. I used 2 IF statements to test for the lenght of the credit card number. Sub test() 'Cell A1 contains drop down list selection If Range("A1") = "American Express" Then CCNumber = 15 Else CCNumber = 16 End If If Len(EnteredNumber) < CCNumber Then MsgBox ("Invalid Credit Card Number") Else 'enter you code here End If End Sub "Pam" wrote: Thanks Joel, I'll try to be clearer on the credit card number issue. I think I need to use an if statement. I want it to be if, visa/mastercard then 16 digits, if american express then 15 digits. but since I'm using a drop down list for the choices of visa, mastercard, discover or american express I can't get an if statement to work because it comes up with an error? "Joel" wrote: Pam: I answer the qustion below in the row with the dashed lines (2 places). Well, I have the vba form done, but don't know how to call it into the excel spreadsheet. That's probably the simplest thing to do, I know, but I've been away from this for a long time. -------------------------------------------------- The VBA userform from a macro is called by userform1.Listbox1.clear userform1.show The listbox will keep previous contants so you need to clear it before you open it. You can change the name in VBA by going to view menu adding property window to VBA. then in the Project window select form - userform1. Changing name to Creditform will then change the name in VBA to CredFrom.show. You may also want to change the caption. ----------------------------------------------------- The other problem I'm having is I have a drop down list for credit cards, that chooses, Visa, AE ...etc. and I want to have the entry cell change if it is visa, or american express, since they have different amounts of digits, and to confirm that they have entered the correct amount of digits. I have the custom formating now for visa, but it will not work for american express. Sorry to be so dense on this. :( -------------------------------------------------------- I having trouble figuring out what you are doing. The same things can be done in both VBA code and in the spreadsheet and the answer will be completely different depending on which method is used. Sometimes there is multiple way of doing things in both. I think you are using for the drop down list Data Validation List. Not sure why custom formating will not work on a spreadsheet (you may be using a different method). A spreadsheet from will accept any number of characters or digits? If you are using a data validation you can set the number of digits to between and make it the length between both numbers. Sorry If I'm not understanding which methods you are using. -------------------------------------------------------- "Joel" wrote: It is hard to give you additional information. It seems that you know how to generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks "Pam" wrote: Well, I have the vba form done, but don't know how to call it into the excel spreadsheet. That's probably the simplest thing to do, I know, but I've been away from this for a long time. The other problem I'm having is I have a drop down list for credit cards, that chooses, Visa, AE ...etc. and I want to have the entry cell change if it is visa, or american express, since they have different amounts of digits, and to confirm that they have entered the correct amount of digits. I have the custom formating now for visa, but it will not work for american express. Sorry to be so dense on this. :( "Joel" wrote: It is hard to give you additional information. It seems that you know how to generate a form. You have one and it is already working. You should be able to generate two additional forms. Copying the data from one form to another is not different than copying data from one worksheet to another worksheet. Is this where you problem lies? sheets("Sheet2").range("C5").value = sheets("Sheet1").range("A1").value Forms names are the names on the tabs at the bottom of the worksheet which are the same as sheet names. "Pam" wrote: I have a dilema, I have one form that is filled out with basic info that needs to download into two other forms and then save to a pdf. I can get the general form, and protect it, but am having problems with the logistics of the other functions. For instance, I have Customer Name Customer Number Work order Number Qty Part Number Sales Amount Wholesale Amount etc.... The one form goes to the supplier, so it needs wholesale dollars on it, and the other form goes to the office, so it needs sales dollars on it. All of this needs to be iron clad so that the information changes UNLESS the credit card has already been processed. I have been working on this awhile, but am hitting a blank wall, any suggestions on where to start? Thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Drop down population... | Excel Programming | |||
Drop down population... | Excel Programming | |||
Help :-( - Auto Population | Excel Worksheet Functions | |||
Every Sat Date Population | Excel Discussion (Misc queries) | |||
Mass population using a macro or something else? | Excel Programming |