P
Phillips
Can I create a spreadsheet and then "build" a userform from it?
Example:
Speadsheet1 has 5 columns
A B C D E
F G H
LabelName Type Title_name VarName TabOrder CrossRefSheet
CrossRefCol Style
Name TexBox 1 Name_ 1
data A
Name label 1
Address TexBox 2 Add_ 2
data B
Spreadsheet2 is called Data
It is build like:
Name Address
Here is what I want the form to look like:
----------------------------------------------------------
| Name: | | Address: | | |
|
|
|
|
----------------------------------------------------------
Here is what I think the code should flow like: but have no idea of the
syntax...
select spreadsheet1
recloop=0
do while recloop <= reccount
mLabelName = spreadsheet.A & recloop
mTYPE = spreadsheet.B & recloop
mMarker = spreadsheet.C & recloop
mStyle = spreadsheet.E & recloop
mTagOrder = spreadsheet.D & recloop
mWorkSheet = spreadsheet.F & recloop
mWorkCol = spreadsheet.G & recloop
if mType = "label"
..Caption = mLabelName
..Style = mStyle
create object. mLabelName
else if mType = "Textbox"
..Caption = mLabelName
..Style = mStyle
..Tag = mTagOrder
create object. mLabelName
mLabelName =end while
Textbox & mMarker = " worksheet " & mWorkSheet & mWorkCol
endif
end loop
TIA
Phil
Example:
Speadsheet1 has 5 columns
A B C D E
F G H
LabelName Type Title_name VarName TabOrder CrossRefSheet
CrossRefCol Style
Name TexBox 1 Name_ 1
data A
Name label 1
Address TexBox 2 Add_ 2
data B
Spreadsheet2 is called Data
It is build like:
Name Address
Here is what I want the form to look like:
----------------------------------------------------------
| Name: | | Address: | | |
|
|
|
|
----------------------------------------------------------
Here is what I think the code should flow like: but have no idea of the
syntax...
select spreadsheet1
recloop=0
do while recloop <= reccount
mLabelName = spreadsheet.A & recloop
mTYPE = spreadsheet.B & recloop
mMarker = spreadsheet.C & recloop
mStyle = spreadsheet.E & recloop
mTagOrder = spreadsheet.D & recloop
mWorkSheet = spreadsheet.F & recloop
mWorkCol = spreadsheet.G & recloop
if mType = "label"
..Caption = mLabelName
..Style = mStyle
create object. mLabelName
else if mType = "Textbox"
..Caption = mLabelName
..Style = mStyle
..Tag = mTagOrder
create object. mLabelName
mLabelName =end while
Textbox & mMarker = " worksheet " & mWorkSheet & mWorkCol
endif
end loop
TIA
Phil