<body id="************" style="position: absolute; top: 0px; width: 1px; height: 1px; overflow: hidden; left: -1000px;">
<tbody style="margin: 0px; padding: 0px; border: 0px;">
[TD="class: votecell"] [/TD]
[TD="class: postcell"]I'm trying to create a small inventory system using excel, and I would like to use a macro to add a new record. My table and userform is in place, however, I have several issues.
First is that I'm unable to "lock" my comboboxes. I've tried locking it through its properties, however, the result is I'm now unable to select an item from the list. (The comboboxes are prepopulated). I have a button within my sheet (Add New Record) and it contains a code:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> UserForm1 . ComboBox1 . List = Array ( "HO" , "SI" , "SV" , "PTSF" )
UserForm1 . ComboBox2 . List = Array ( "AP" , "FU" , "GE" , "IT" )
UserForm1 . Show </code>And on my combobox:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> Private Sub ComboBox1_KeyPress ( ByVal KeyAscii As MSForms . ReturnInteger )
If KeyAscii = 8 Or KeyAscii = 127 Then
KeyAscii = 0
Else
End If
end sub </code>The code on my combobox does not work, and what I would like to happen is to lock it so that nothing can be typed or edited.
Second problem is that I don't know how to call my table, and insert the data on my userform to it. I've tried this earlier:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> sheet1 . table1 . Lastrow = userform1 . textbox1 . value </code>but obviously it does not work
I hope someone can help me. Thanks in advance!
[/TD]
</tbody></body>
<tbody style="margin: 0px; padding: 0px; border: 0px;">
[TD="class: votecell"]
[TD="class: postcell"]I'm trying to create a small inventory system using excel, and I would like to use a macro to add a new record. My table and userform is in place, however, I have several issues.
First is that I'm unable to "lock" my comboboxes. I've tried locking it through its properties, however, the result is I'm now unable to select an item from the list. (The comboboxes are prepopulated). I have a button within my sheet (Add New Record) and it contains a code:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> UserForm1 . ComboBox1 . List = Array ( "HO" , "SI" , "SV" , "PTSF" )
UserForm1 . ComboBox2 . List = Array ( "AP" , "FU" , "GE" , "IT" )
UserForm1 . Show </code>And on my combobox:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> Private Sub ComboBox1_KeyPress ( ByVal KeyAscii As MSForms . ReturnInteger )
If KeyAscii = 8 Or KeyAscii = 127 Then
KeyAscii = 0
Else
End If
end sub </code>The code on my combobox does not work, and what I would like to happen is to lock it so that nothing can be typed or edited.
Second problem is that I don't know how to call my table, and insert the data on my userform to it. I've tried this earlier:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> sheet1 . table1 . Lastrow = userform1 . textbox1 . value </code>but obviously it does not work
I hope someone can help me. Thanks in advance!
[/TD]
</tbody>
<tbody style="margin: 0px; padding: 0px; border: 0px;">
[TD="class: votecell"] [/TD]
[TD="class: postcell"]I'm trying to create a small inventory system using excel, and I would like to use a macro to add a new record. My table and userform is in place, however, I have several issues.
First is that I'm unable to "lock" my comboboxes. I've tried locking it through its properties, however, the result is I'm now unable to select an item from the list. (The comboboxes are prepopulated). I have a button within my sheet (Add New Record) and it contains a code:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> UserForm1 . ComboBox1 . List = Array ( "HO" , "SI" , "SV" , "PTSF" )
UserForm1 . ComboBox2 . List = Array ( "AP" , "FU" , "GE" , "IT" )
UserForm1 . Show </code>And on my combobox:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> Private Sub ComboBox1_KeyPress ( ByVal KeyAscii As MSForms . ReturnInteger )
If KeyAscii = 8 Or KeyAscii = 127 Then
KeyAscii = 0
Else
End If
end sub </code>The code on my combobox does not work, and what I would like to happen is to lock it so that nothing can be typed or edited.
Second problem is that I don't know how to call my table, and insert the data on my userform to it. I've tried this earlier:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> sheet1 . table1 . Lastrow = userform1 . textbox1 . value </code>but obviously it does not work
I hope someone can help me. Thanks in advance!
[/TD]
</tbody>
<tbody style="margin: 0px; padding: 0px; border: 0px;">
[TD="class: votecell"]
down votefavorite
[/TD]
[TD="class: postcell"]I'm trying to create a small inventory system using excel, and I would like to use a macro to add a new record. My table and userform is in place, however, I have several issues.
First is that I'm unable to "lock" my comboboxes. I've tried locking it through its properties, however, the result is I'm now unable to select an item from the list. (The comboboxes are prepopulated). I have a button within my sheet (Add New Record) and it contains a code:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> UserForm1 . ComboBox1 . List = Array ( "HO" , "SI" , "SV" , "PTSF" )
UserForm1 . ComboBox2 . List = Array ( "AP" , "FU" , "GE" , "IT" )
UserForm1 . Show </code>And on my combobox:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> Private Sub ComboBox1_KeyPress ( ByVal KeyAscii As MSForms . ReturnInteger )
If KeyAscii = 8 Or KeyAscii = 127 Then
KeyAscii = 0
Else
End If
end sub </code>The code on my combobox does not work, and what I would like to happen is to lock it so that nothing can be typed or edited.
Second problem is that I don't know how to call my table, and insert the data on my userform to it. I've tried this earlier:
<code style="margin: 0px; padding: 0px; border: 0px; font-family: Consolas, Menlo, Monaco, "Lucida Console", "Liberation Mono", "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Courier New", monospace, sans-serif; white-space: inherit;"> sheet1 . table1 . Lastrow = userform1 . textbox1 . value </code>but obviously it does not work
I hope someone can help me. Thanks in advance!
[/TD]
</tbody>