Littlecube
New Member
- Joined
- Feb 2, 2018
- Messages
- 3
Hello,
I am really new with programming and this is my first job with VBA, I hope somebody can help me, because I cannot find solution for some days.. :/
In my excel are more sheets and each has 1 table objects
- after opening the workbook, the macro set of its visible to false and show UserForm1
In UserForm1 are more commandbutton to open other userforms
- every userforms has got 1 listbox, what is selected in the listbox will be a content in one of the Textbox in UserForm1. The contents in UserForm1 will be a part of a record.
- I set the RowSources of listboxes with the name of tables in the property window
In UserForm1 is a Save commandbutton to make a record from textboxes contents and make safety copy of the whole file.
The problem:
- After the UserForm1 show up, I click one of the commandbutton to show a sub UserForm to select a line.
- I can chose what I want and it will placed in Userform1 properly.
BUT, when I open again the sub UserForm, then the Listbox is empty. This problem is happaning by every sub Userform.
Surprise: After I click on the "Save" command button, all the sub Userform working perfectly, the Listboxes always have their Rowsource any time I open them.
I cannot find, what is the difference between the first opening and after the save process "opening" (there is no code in save process, to close or open Userform1).
Thank you in advance for your helping porpuse!
I am really new with programming and this is my first job with VBA, I hope somebody can help me, because I cannot find solution for some days.. :/
In my excel are more sheets and each has 1 table objects
- after opening the workbook, the macro set of its visible to false and show UserForm1
In UserForm1 are more commandbutton to open other userforms
- every userforms has got 1 listbox, what is selected in the listbox will be a content in one of the Textbox in UserForm1. The contents in UserForm1 will be a part of a record.
- I set the RowSources of listboxes with the name of tables in the property window
In UserForm1 is a Save commandbutton to make a record from textboxes contents and make safety copy of the whole file.
The problem:
- After the UserForm1 show up, I click one of the commandbutton to show a sub UserForm to select a line.
- I can chose what I want and it will placed in Userform1 properly.
BUT, when I open again the sub UserForm, then the Listbox is empty. This problem is happaning by every sub Userform.
Surprise: After I click on the "Save" command button, all the sub Userform working perfectly, the Listboxes always have their Rowsource any time I open them.
I cannot find, what is the difference between the first opening and after the save process "opening" (there is no code in save process, to close or open Userform1).
Thank you in advance for your helping porpuse!