YellowSkin
New Member
- Joined
- Jun 9, 2020
- Messages
- 9
- Office Version
- 365
- Platform
- Windows
Hi all,
Hope you can help me with below issue. Thank you in advance.
Context
I have a userform that requests the name of an entity. Once the name is entered the user can choose to collect data (if any). To do so I have created a button. Once clicked the idea is that other elements in the userform (i.e. other comboboxes and textboxes will be populated. However I cant seem to get the code to work.
Hope you can help me with below issue. Thank you in advance.
Context
I have a userform that requests the name of an entity. Once the name is entered the user can choose to collect data (if any). To do so I have created a button. Once clicked the idea is that other elements in the userform (i.e. other comboboxes and textboxes will be populated. However I cant seem to get the code to work.
VBA Code:
Sub loadData()
'Define variables
entity = userform_assetEntry.combobox_entity.Value
parentEntity_1 = userform_assetEntry.combobox_parent_entity_1.Value
parentEntity_2 = userform_assetEntry.combobox_parent_entity_2.Value
parentEntityPercentage_1 = userform_assetEntry.textbox_parent_1_percentage.Value
parentEntityPercentage_2 = userform_assetEntry.textbox_parent_2_percentage.Value
currencyCode = userform_assetEntry.textbox_currency.Value
startFY = userform_assetEntry.textbox_startfy.Value
jurisdiction = userform_assetEntry.textbox_jurisdiction.Value
citRate = userform_assetEntry.textbox_cit_rate.Value
specialRegime = userform_assetEntry.combobox_special_regime.Value
'push subject_entity to sheet5 - [I]this is done so that the relevant numbers are collected via a simple INDEX MATCH function. This part of the code works.[/I]
Sheet5.Cells(2, 1).Value = entity
'load general information -[I] this is the part that DOESNT work. [/I]
parentEntityPercentage_1 = Sheet5.Cells(2, 3).Value
parentEntity_2 = Sheet5.Cells(2, 4).Value
parentEntityPercentage_2 = Sheet5.Cells(2, 5).Value
startFY = Sheet5.Cells(2, 9).Value
jurisdiction = Sheet5.Cells(2, 10).Value
currencyCode = Sheet5.Cells(2, 11).Value
parentEntity_1 = Sheet5.Cells(2, 2).Value
citRate = Sheet5.Cells(2, 12).Value
specialRegime = Sheet5.Cells(2, 13).Value
'Load Asset Information
'check of er informatie ingeladen moet worden
'inladen van de informatie
'naar volgende regel
End Sub