There is no « TB17 » textbox and that’s why you get an error.

 

Regards.

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de shariq khan
Envoyé : samedi 9 juillet 2011 13:01
À : excel-macros@googlegroups.com; dcolarde...@free.fr
Objet : Re: $$Excel-Macros$$ Need Help Help Help.....Putting value in user
from by loop

 

Please find the attached workbook. on login page use "Mudit Sharma"  as user
name and password is nothing.

 

On "Credentials Required!" tab i have create a "Test Button" and trying to
fill the counts.


 

On Sat, Jul 9, 2011 at 2:58 PM, Daniel <dcolarde...@free.fr> wrote:

“Me” represents the object containing the code ; so, in this case, « me » is
equivalent to “Userform2”. Can you post your workbook ?

 

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de shariq khan
Envoyé : samedi 9 juillet 2011 00:32 


À : excel-macros@googlegroups.com
Objet : Re: $$Excel-Macros$$ Need Help Help Help.....Putting value in user
from by loop

 

Daneil, that is what i want.... but the same code is not working.....in my
sheet.

 

what is Me.contol ?

 

On Fri, Jul 8, 2011 at 10:22 PM, Daniel <dcolarde...@free.fr> wrote:

Give a try at the attached file.

 

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de shariq khan
Envoyé : vendredi 8 juillet 2011 18:17 


À : excel-macros@googlegroups.com
Objet : Re: $$Excel-Macros$$ Need Help Help Help.....Putting value in user
from by loop

 

Daneil,

 

This one "txtbox_val = Me.Controls("TB" & num).Value".

 

This is not on the worksheet, i'm using one userform and on which i have
many texboxes...... but i'm not able to put the value in by using loop, once
this is done then i will link it to the sheet values. 

 

The main fight it how to dynamicly refer TB1,TB2,TB3......TB22

 

I really need to do thought loop as many time i have to disable it, enable
it clear the value of the textbox and putting values into the text box..

 


 

On Fri, Jul 8, 2011 at 6:05 PM, Daniel <dcolarde...@free.fr> wrote:

Didn’t you say the textboxes were in a userform ? if they are on a
worksheet, the syntax should be :

 

With ActiveSheet

    For i = 1 To 22

        txtbox_val  = .OLEObjects("TB" & i).Object.Value

    Next i

End With

 

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de shariq khan
Envoyé : vendredi 8 juillet 2011 13:11 


À : excel-macros@googlegroups.com

Objet : Re: $$Excel-Macros$$ Need Help Help Help.....Putting value in user
from by loop 

 

Hi Daneil,

 

Thanks but it didnt worked..............

 

Run-time error '-2147024809

Could not find the specified object

 

Thanks,

Shariq

On Fri, Jul 8, 2011 at 11:12 AM, Daniel <dcolarde...@free.fr> wrote:

Hi,

 

Try :

 

For num = 1 To 22

    txtbox_val = Me.Controls("TB" & num).Value

    txtbox_num = num

Next num

 

Regards.

Daniel

 

De : excel-macros@googlegroups.com [mailto:excel-macros@googlegroups.com] De
la part de shariq khan
Envoyé : vendredi 8 juillet 2011 11:00
À : excel-macros@googlegroups.com
Objet : $$Excel-Macros$$ Need Help Help Help.....Putting value in user from
by loop

 

I’m trying to assign the value in excel user from thought loop.

 

Name of the textboxes are TB1,TB2,TB3…….. TB22  .

 

Below is the code which I’m using ,but its not working. 

 

For num = 1 To 22

        txtbox_val = "TB" & num & ".value"

            txtbox_val = num

        End If

  Next num

 

 

The same thing I wanted to do with the label and the names of the label are
L1,L2,L3……L22

 

Please help me on this.

 

  



-- 
Thanks and Reagrd’s
Shariq


 

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at  <http://exceldailytip.blogspot.com/>
http://exceldailytip.blogspot.com

To post to this group, send email to  <mailto:excel-macros@googlegroups.com>
excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
 <http://www.facebook.com/discussexcel> http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
<http://exceldailytip.blogspot.com/> 

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel




-- 
Thanks and Reagrd’s
Shariq Shazad Khan 
9999066979,9891184784

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
<http://exceldailytip.blogspot.com/> 

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
<http://exceldailytip.blogspot.com/> 

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel




-- 
Thanks and Reagrd’s
Shariq Shazad Khan 
9999066979,9891184784

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
<http://exceldailytip.blogspot.com/> 

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
<http://exceldailytip.blogspot.com/> 

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel




-- 
Thanks and Reagrd’s
Shariq Shazad Khan 
9999066979,9891184784

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at  <http://exceldailytip.blogspot.com/>
http://exceldailytip.blogspot.com

To post to this group, send email to  <mailto:excel-macros@googlegroups.com>
excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
 <http://www.facebook.com/discussexcel> http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
<http://www.excel-macros.blogspot.com/> 
4. Learn VBA Macros at http://www.quickvba.blogspot.com
<http://www.quickvba.blogspot.com/> 
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
<http://exceldailytip.blogspot.com/> 

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel




-- 
Thanks and Reagrd’s
Shariq Shazad Khan 
9999066979,9891184784

-- 
----------------------------------------------------------------------------
------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links :
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com

To post to this group, send email to excel-macros@googlegroups.com
 
<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

-- 
----------------------------------------------------------------------------------
Some important links for excel users:
1. Follow us on TWITTER for tips tricks and links : 
http://twitter.com/exceldailytip
2. Join our LinkedIN group @ http://www.linkedin.com/groups?gid=1871310
3. Excel tutorials at http://www.excel-macros.blogspot.com
4. Learn VBA Macros at http://www.quickvba.blogspot.com
5. Excel Tips and Tricks at http://exceldailytip.blogspot.com
 
To post to this group, send email to excel-macros@googlegroups.com

<><><><><><><><><><><><><><><><><><><><><><>
Like our page on facebook , Just follow below link
http://www.facebook.com/discussexcel

Reply via email to