Hi Leon,
This is my version of the code using only 1 item
Dim Item1 As SAPbouiCOM.Item
'// Adding Folder items (Folder1 - Transfer Request)
Item1 = oForm.Items.Add("Folder1", SAPbouiCOM.BoFormItemTypes.it_FOLDER)
Item1.FontSize = 16
Item1.Left = 0
Item1.Width = 300
Item1.Top = 15
Item1.Height = 10
oFolder = Item1.Specific
oFolder.Caption = "Tfr Request"
oFolder.DataBind.SetBound(True, "", "FolderDS1")
'// Adding Folder items (Folder2 -Tfr: STORE -> SHIP)
Item1 = oForm.Items.Add("Folder2", SAPbouiCOM.BoFormItemTypes.it_FOLDER)
Item1.FontSize = 16
Item1.Left = 100
Item1.Width = 400
Item1.Top = 15
Item1.Height = 10
oFolder = Item1.Specific
oFolder.Caption = "Tfr: STORE -> SHIP"
oFolder.DataBind.SetBound(True, "", "FolderDS2")
oFolder.GroupWith("Folder1")
If you still want to use multiple dim, it is still OK, under current technology when personal PC may have Gigabytes of memory, the memory usage is not such important compare to olden days.
But, I think (my personal view), reusing the variable is the way to go.
at least, it saves you from declaring tens or hundreds of variable, doesn't it ?
Regards
Edy