Hello everyone,
I'm sorry if this has been brought up in another thread, but I'm not good at toggling forums and I hadn't been able to find an answer I could understand, with both google or youtube, or in this forum.
Well, my issue is; as I'm a Role playing nerd, I have started to create a charactersheet for this purpose. In the past I have created this in excel only, with a lot of "if, and, else" codes, references to various cells, adding and subtracting values, but this time I wanted to do the coding in VB, as I would love to learn VB (started a few days ago, and spend some hours reading about VB and a few trying to create some codes, I don't completely understand the dim functions, loop functions ect. yet, but I'm getting there).
I started off by creating one tab/sheet for presentations and another for data, and I chose to use userforms made in VB as the means of choosing between the various options presented in a typical charactersheet/rulebook.
So fare I succeed in making a userform, brought up by a run-macro when pushing a icon on the presentations sheet. In this userform I have placed a listbox, this listbox is feed with information's from a 3 column list, with x rows, on the datasheet. I have set up the listbox to display all the 3 columns, I have succeeded with returning one of the values in one of the 3 columns, to what ever cell I chose in the presentations sheet, by setting the BoundColumn under property of the listbox and then creating a command-bottom applying selection in listbox when clicked.
My problem is, that this listbox contains 3 values and I want to use all values in various cells, ex. worksheets("sheet1").cells(1, 1) = listbox1.(selected row, column 1) and the worksheets("sheet1").cells(1, 2) = listbox1.(selected row, column 2).
Anyone who can tell me what function I need to use and write in an command-bottom or something, so that I can place each column value in a specific cell, in a specific worksheet, and in a very simple and basic way?
Btw... I'm using excel 2012 and the build in VB functions it provides, I don't know it there are any differences between various versions of excel and VB.
In advance, Thank! for what every help you can provide me.
Kind Regard
Martin Kristensen (alias; the VB Noob! :p)
Bookmarks