Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
In Excel 2000 VBE want's str as Object
And needs the Set instruction Dim str As Object Set str = UserForm1.CheckBox1 str = 1 UserForm1.Show I don't know how to make it work from a string -- steveB Remove "AYN" from email to respond "Aran" wrote in message ... Hello I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Me.Controls(str).Value = True
BTW you cannot set a checbox value to 10, just True or False. -- HTH RP (remove nothere from the email address if mailing direct) "Aran" wrote in message ... Hello I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sorry about my example
i have the checkboxes on a worksheet and when i try your example it say it cant find the method "controls" "Bob Phillips" wrote: Me.Controls(str).Value = True BTW you cannot set a checbox value to 10, just True or False. -- HTH RP (remove nothere from the email address if mailing direct) "Aran" wrote in message ... Hello I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
#5
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
No problems Aran, just making sure.
I Assumed userform checkbox. If it is a control toolbox checkbox, use ActiveSheet.OLEObjects(str).Object.Value = True If it is a forms checkbox, use ActiveSheet.CheckBoxes(str).Value = True -- HTH RP (remove nothere from the email address if mailing direct) "aran" wrote in message ... Sorry about my example i have the checkboxes on a worksheet and when i try your example it say it cant find the method "controls" "Bob Phillips" wrote: Me.Controls(str).Value = True BTW you cannot set a checbox value to 10, just True or False. -- HTH RP (remove nothere from the email address if mailing direct) "Aran" wrote in message ... Hello I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
#6
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Thanks
Thats worked fine with the value but if i try visible it say that the method is not supported And if i like to run a funktion the same way how do i do "Bob Phillips" wrote: No problems Aran, just making sure. I Assumed userform checkbox. If it is a control toolbox checkbox, use ActiveSheet.OLEObjects(str).Object.Value = True If it is a forms checkbox, use ActiveSheet.CheckBoxes(str).Value = True -- HTH RP (remove nothere from the email address if mailing direct) "aran" wrote in message ... Sorry about my example i have the checkboxes on a worksheet and when i try your example it say it cant find the method "controls" "Bob Phillips" wrote: Me.Controls(str).Value = True BTW you cannot set a checbox value to 10, just True or False. -- HTH RP (remove nothere from the email address if mailing direct) "Aran" wrote in message ... Hello I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
#7
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello
I find out how to do ActiveSheet.OLEObjects(str).Visible = True worked fine but i still have the question about how to run a funktion "aran" wrote: Thanks Thats worked fine with the value but if i try visible it say that the method is not supported And if i like to run a funktion the same way how do i do "Bob Phillips" wrote: No problems Aran, just making sure. I Assumed userform checkbox. If it is a control toolbox checkbox, use ActiveSheet.OLEObjects(str).Object.Value = True If it is a forms checkbox, use ActiveSheet.CheckBoxes(str).Value = True -- HTH RP (remove nothere from the email address if mailing direct) "aran" wrote in message ... Sorry about my example i have the checkboxes on a worksheet and when i try your example it say it cant find the method "controls" "Bob Phillips" wrote: Me.Controls(str).Value = True BTW you cannot set a checbox value to 10, just True or False. -- HTH RP (remove nothere from the email address if mailing direct) "Aran" wrote in message ... Hello I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
#8
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
test 4 to post
Hello Bob What i want to do is I have one combobox where i can chose a value i then use combobox linkedcell to get a number the other subroutines have i named choice1, choice2, and so on when that is done i like to run the subroutine that match the value of the other subroutines i have named them choice1, choice2, and so on that subroutine runs another where i use the code you helped me with Private Sub CentralComboBox_Change() ' End Sub Private Sub CentralVal1() 'here i call other sub's End Sub Private Sub CentralVal2() 'here i call other sub's End Sub "Aran" wrote: Hello I have a question about strings How do i make the value runnable ex. str = "checkbox1" and i like to use the string instead of the name checkbox1 and do this checkbox1.value = 10 or if the string contain a name of a funktion how to run that with the string i hope you understand my question thanks |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
find and replace numeric strings in larger text strings | Excel Worksheet Functions | |||
How to find number of pairs of strings from list of strings? | Excel Worksheet Functions | |||
How can I count strings within strings | Excel Worksheet Functions | |||
Finding strings within strings | Excel Programming | |||
Finding strings within strings | Excel Programming |