Question about Computers & Internet

5 Answers

Is it possible to use a variable expression in VBA for a form label?

I want to place 100 different values for 100 different labels on a form. I can do it simply with the following loop, but VBA won't accept any syntax I have tried for the label name.
For CT = 1 to 100
[Forms]![F3-subject index]!["sn"&CT].Caption=valuearray(CT)
next CT
How can this loop be accomlished?

Posted by on

  • 3 more comments 
  • Bushtrekker Sep 12, 2008

    The solution didn't seem to address my problem

  • Bushtrekker Sep 12, 2008

    This solution relates to excel. I am working with labels on an access form. Can my loop be performed in VBA or DAO for access? If so, what is the syntax?

  • Bushtrekker Sep 12, 2008

    I already spent a day searching various forums and links such as the one you suggest. They do not address the particular question: "Can a variable be used in VBA to designate the label name on a form? If so, what is the syntax? IF not, can it be done in DAO? If so, what is the syntax?

  • Bushtrekker Sep 12, 2008

    Coolguy008 suggests:
    Dim lbl as label
    lbl.Caption = "string"
    [Forms]![F3-subject index]![sn5] = label
    But, "sn5" in your solution is not a variable. I want to use a variable in the place of [sn5]. If this is a solution, you'll have to explain it to me.

  • Bushtrekker Sep 12, 2008

    Yes, Suben, that is exactly what I did. But, that syntax doesn't work.

×

5 Answers

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Genius:

    An expert who has answered 1,000 questions.

  • Master
  • 1,665 Answers

Have a look at some relative questions

Posted on Sep 12, 2008

  • Level 2:

    An expert who has achieved level 2 by getting 100 points

    MVP:

    An expert that got 5 achievements.

    Sergeant:

    An expert that has over 500 points.

    Champion:

    An expert who has answered 200 questions.

  • Expert
  • 214 Answers

try this
Dim lbl as label
lbl.Caption = "string"
[Forms]![F3-subject index]![sn5] = label

hope it works

Posted on Sep 12, 2008

  • Subhendu Das
    Subhendu Das Sep 12, 2008

    or this
    [Forms]![F3-subject index]!["sn"&CT].Caption=valuearray(CT)

    next CT



×

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    President:

    An expert whose answer got voted for 500 times.

  • Master
  • 1,952 Answers



download tis software and use it
Financial Excel All Programs Complete Edition

then check ur loop is correct in syntax

use tis below links for tutorial

http://www.lacher.com/toc/tutvba1.htm

http://www.blueclaw-db.com/access_createquerydef.htm




Posted on Sep 12, 2008

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Genius:

    An expert who has answered 1,000 questions.

  • Master
  • 3,422 Answers

HI,

Please click on the below link and go through the post.It will help you fix your problem.

http://www.dailydoseofexcel.com/archives/2006/12/04/writing-to-a-range-using-vba/

Posted on Sep 12, 2008

  • 2 more comments 
  • Priya darshan Sep 12, 2008

    Please don't forget to accept the solution as fixya.

  • Priya darshan Sep 12, 2008

    Please don't forget to accept the solution as fixya.



  • Priya darshan Sep 12, 2008

    ok..please try out this syntax


    Dim lbl as label

    lbl.Caption = "string"

    [Forms]![F3-subject index]![sn5] = label

    I hope this will help and please don't forget to accept my solution.



  • Priya darshan Sep 12, 2008

    Did you already try this:

    Dim lbl as label

    lbl.Caption = "string"

    [Forms]![F3-subject index]![sn5] = label



×

  • Level 3:

    An expert who has achieved level 3 by getting 1000 points

    All-Star:

    An expert that got 10 achievements.

    MVP:

    An expert that got 5 achievements.

    Genius:

    An expert who has answered 1,000 questions.

  • Master
  • 1,239 Answers

    • hi,,
    •  u could find the link.. for label name..
    • www.functionx.com/​vbaccess/​Lesson09.htm
    •  
        thank u sir..

Posted on Sep 12, 2008

1 Suggested Answer

6ya6ya
  • 2 Answers

SOURCE: I have freestanding Series 8 dishwasher. Lately during the filling cycle water hammer is occurring. How can this be resolved

Hi,
a 6ya expert can help you resolve that issue over the phone in a minute or two.
best thing about this new service is that you are never placed on hold and get to talk to real repairmen in the US.
the service is completely free and covers almost anything you can think of (from cars to computers, handyman, and even drones).
click here to download the app (for users in the US for now) and get all the help you need.
goodluck!

Posted on Jan 02, 2017

Add Your Answer

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1 Answer

How to set up and solve n+2n-3000


I believe some minimal amount of knowledge of the concept will go a long way to teach you any subject.
When you say solve in Math, you mean solve an equation. An equation is a mathematical expression (with some unknown) that is equal to some other expression, usually a known value. That requires an = sign. However you do not have one.
All you can do is write the expression in as compact a form as possible. In this case, you combine the two like-terms that have the variable n to get 3n.
You expression is therefore 3n-3000. Period.

Jan 12, 2012 | SoftMath Algebrator - Algebra Homework...

2 Answers

I have got a datamax m class mark II and i have got a fault top of form and i can not print anything or i can not connect to printer from my computer. i have all drivers on and i think all is fine but i...


1)PLACE THE SENSOR IN TO THE LABEL GAP PROPERLY 2)CHECK THE SENSOR TYPE IN PRINTER(menu->media settings->sensor type) 3)PERFORM A MEDIA AUTO CALIBRATION(press and hold feed on control panel) 4)SET FACTORY DEFAULT SETTINGS

Apr 15, 2011 | Datamax M-4208 Thermal Label Printer

1 Answer

After each label I print the printer automatically advances 3/4 of the way through the next label. Is there a setting to stop at the end of each label?


I don't know the particulat incantations for this printer, but it sounds like the "form length" or "label length" is not set correctly. Normally the printer will advance to the beginning of the next label once the printing is complete. Check the menu or setup program for the label length.

Let me know if you can not find this and I'll research the exact commands.

Thanks,
Dan

Aug 12, 2010 | Seiko Smart Label Printer 100 Thermal

1 Answer

Casio fx-7400G PLUS cubic solver?


Hi,
First let us repair the terminology.

  1. You can evaluate any expression (find the value of any expression for a particular value of its variable).Store a value in the variable, say X. Key in the expression and press [EXE].
  2. You can consider your expression(should not contain a relational operator such as =, greater than, less than, greater than or equal to, less than or equal to) to be a function Y1(x) = expression and graph it, or generate a table for it. You will have several values of the function calculated at various points.
  3. You can set your expression equal to 0 and find the particular value(s) of the variable (the unknown) that make the equality TRUE. That is called solving an equation.
I am not sure that it has a solver (solving an equation or an inequation) but you can always draw your expression as a function and explore the graph (SKTCH) to locate the roots (or zeros) of the functions (the values of the variable where the function equals zero.) That is called solving graphically.

Hope it helps.
Thank you for using FixYa and for rating this solution.

Nov 05, 2009 | Casio FX-7400G Plus Calculator

2 Answers

How to stop calibrating soo much?


There is no way to get around the recalibration for different sizes of label, you must do it at every different label height, The callibration only sets the label height/length, so try doing the same length labels in sequence.

Oct 22, 2009 | Zebra 105SL Thermal Label Printer

1 Answer

How do enter a lim of function when from one side using nderiv


Hello,
nDeriv( is valid only for real variables.
The syntax is as follows:
nDeriv ( expression, variable, value, epsilon)

expression: the function the derivative of which you want to calculate
variable: the name of the variable in the expression above (usually x)
value: the numerical value of the e x where you evaluate the derivative
epsilon: the numerical value of the tolerance. Default is 1x10^(-3). But you can change it to a smaller value to obtain a more precise result.

To use default value of epsilon
nDeriv ( expression, variable, value)

To use a different epsilon, ex 1x10^(-4)
nDeriv ( expression, variable, value, 0.0001)

nDeriv( A^3 , A, 5., 0.0001) should give you 75

Hope it helps.

Oct 21, 2009 | Texas Instruments TI-84 Plus Calculator

1 Answer

Not able to print directly on CD/DVD


Printing Directly onto a CD or DVD in Roxio Express Labeler
  1. Make sure that the product is turned on and that the USB cable is connected to the product and the computer.
  2. Click Start , click All Programs , click Roxio , and then click Roxio Express Labeler v3 .
  3. Click Disk Label , then click Options . Figure 1: Options c01452912.gif 1 - Options button
  4. The Options screen appears. Figure 2: Options screen c01452913.gif
  5. Make sure that LightScribe 12cm Disc is selected from the Disc Label menu, then click OK to return to the Roxio Express Labeler window.
  6. Click Disc Titles , type the title and subtitle for the CD or DVD, and then click OK . Figure 3: Disc Title option c01452914.jpg 1 - Disc Titles button Figure 4: Edit Disc Title screen c01452915.gif
  7. Click Background , then click Import Background to use an image on the computer as the background on the CD or DVD. Click OK to return to the Roxio Express Labeler window. Figure 5: Background option c01452916.jpg 1 - Background button
  8. Insert a LightScribe CD or DVD into the LightScribe drive of the product. Make sure that the label side of the disc is facing down.
  9. In the Roxio Express Labeler window, click Print . The LightScribe label is printed on the CD or DVD. Figure 6: Print c01452917.jpg 1 - Print button

Jun 18, 2009 | HP Office Equipment & Supplies

2 Answers

Please send me the code to link two forms of a project file...actually i wanted to to transfer a variable value from one form to another...please forward code as soon as possible


if this is vb 6 then you should be able to access the other variable by using the other forms name so if you are in form1 and want to access a variable in form2

form2.variable_name

and visa versa

If this is another language then it may differ

Apr 30, 2009 | Computers & Internet

1 Answer

How to create Dynamic Lable & TextBox & save their Values in DB.


Best way to do this is to place label and textbox as usual but hide them from the properties.
In the SaveButton Click event, you can set the property for the label and textbox to visible dynamically by code.

Apr 24, 2009 | Microsoft Designing ASP.NET Applications...

1 Answer

Step by step guide to installing sap on windows 2003


hi dear
SAP4.7 Installation On Server 2003 SAP 4.7 INSTALLATION GUIDE 1. CREATE C PARTITION 6GB AND D PARTITION 70GB. INSTALL O.S SERVER. SET SYSTEM YEAR TO 2010 OR 2. CREATE LOOPBACK ADAPTER. START→ SETTINGS→ CONTROL PANEL ADD OR REMOVE HARDWARE→ NEXT→ NEXT→ SELECT ADD ANEW DEVICE NEXT SELECT WANT TO SELECT THE HARDWARESELECT NETWORK ADAPTER SELECT MICROSOFT NEXT NEXT FINISH. 3. CREATE IP ADDRESS MY NETWORK PLACES LOCAL AREA CONNECTION RIGHT CLICK PROPERTIES SELECT INTERNET PROTOCOL (TCP/IP)ADDRESS CLICK ON PROPERTIES AND IN IP ADDRESS 200.200.200. 20 AND OK OK 4. VIRTUAL MEMORY MYCOMPUTER RIGHT CLICK PROPERTIES ADVANCED TAB CHANGE SELECT D DRIVE INITIAL SIZE 2000 MAXIMUM SIZE 2000 CLICK SETOK OK OK 5. COPY ALL THREE DVD IN D DRIVE. SEE THAT D DRIVEMUST HAVE ATLEAST 54-55 GB FREE SPACE. 6. JAVA 1.4 INSTALL [FROM DVD 1] JAVA 1.4 DOUBLE CLICK NEXT I ACCEPT NEXT NEXT NEXT FINISH. JAVA PATH MY COMPUTER RIGHT CLICK PROLPERTIES ADVANCED ENVIORNMENT VARIABLE [SYSTEMVARIABLES ] SELECT NEW VARIABLE NAME JAVA_HOME VARIABLE VALUE ----------- START RUN BROWSE SELECT DRIVE PROGRAM FILES ANDPASTE IN VARIABLE VALUE BOX {Enter Path of JAVA) OK OK OK . 7. ORACLE 8I INSTALL [FROM DVD 3 ] ORACLE 4 NT I386 SETUP ORACLE 8I NEXT NEXT NEXTGLOBAL DATABASE NAME ORA NEXT INSTALL FINISH [ OREXIT] 8. INSTALLATION . [FROM DVD 3] KER NT I386 NTPATCH R3 DLLN DOUBLE CLICK ON THIS PRESS OK. KER SAPINST NT SETUP. SAP 4.7 INSTALLATION SELECT THIS AND PRESS NEXT NEXT SYSTEM ID ----- GIVE ANY DIGIT ALPHABETS [EX: SAI] NEXT SELECT CENTRAL INTANCE NEXT NEXT SELECT LOCAL INSTALLATION NEXT NEXT SELECT C DRIVE NEXT ------- GIVE PASSWORD AS 123 IT WILL ASK TWO TIMES THATPASSWORD NEXT 9. AFTER INSTALLATION OF ABOVE STEP GO TO : \ RIGHT CLICK ON USR SHARING & SECURITY SHARETHE FOLDER IN SECURITY TAB TICK ALL ALLOW. GO TO PROGRAMS SAP INST ORACLE KERNEL CLICK ONPREPARE NEW INSTALLATION. THEN AGAIN GO TO PROGRAMS SAP INST ORACLE KERNEL CLICK ON SAPINST SERVE WITH GUI. AGAIN FOLLOWS THE STEP IN STEP 8 WITH THE FOLLOWINGCHANGES. SELECT DATABASE INSTANCE INSTEAD OF CENTRAL INSTANCE SELECT LOCAL INSTALLATION NEXT NEXT SELECT D DRIVE D DRIVE} FOR BOTH OPTIONS NEXT NEXT IN PACKAGE LOCATION GIVE THE ADDRESS OF DB1-----ETC. DB1 EXPORT 1 LABEL.ASC DB2 EXPORT 2 LABEL.ASC DB3 EXPORT 3 LABEL.ASC EXPORT 4 LABEL.ASC EXPORT 5 LABEL.ASC EXPORT 6 LABEL.ASC EXPORT 7 LABEL.ASC NEXT NEXT. SELECT THE OPTION NO MNLS REQUIRED AFTER THIS IT WILL TAKE 15 HRS FOR INSTALLATION. ITWILL SHOW SUCCESSFULLY INSTALLED. 10. GO TO GUI GUI WINDOWS WIN32 SETUP. ã NEXT NEXT SELECT ALL NEXT INSTALL. 11. AFTER THAT CLICK ON SAP LOGON IN THAT CLICK ONNEW ITEMS DESCRIPTION ANY NAME APPLICATION SERVER TO KNOW THISOPEN SAP MANAGEMENT CONSOLE, IN THAT CHECK THE NAME ABOVEPROCESS LIST AND FILL WITH THAT NAME. SYSTEM NUMBER 00 12. CLICK ON LOGON USER ID DDIC PASSWORD 19920706. THEN GO TO SU01 TRANSACTION. GIVE THE USER SAPUSER (this is the user name to logon to sap) THEN PRESS F8. GIVE ANY NAME IN LAST NAME INITIAL PASSWORD REPEAT PASSWORD. THEN CLICK THE TAB PROFILES GIVE SAP _ALL SAP_ NEW & THEN PRESS ENTER & SEE IT WILL ASK THE PASSWORD , THIS IS THE PASSWORD TOLOGON TO SAP, GIVE ANY PASSWORD AND LOG OFF. 13. AGAIN LOGIN TO SAP NEW ID & PASSWORD AND THEN GOTO SE38 AND CREATE A PROGRAM STARTING WITH LETTER IT WILL ASK FORACCESS KEY. IN THAT TYPE 366 87 66 322126 127 8 694. Thank you
Imrna
Pls rank me as possible have nice day

Apr 20, 2009 | Microsoft Windows Server Standard 2003 for...

Not finding what you are looking for?
Computers & Internet Logo

Related Topics:

372 people viewed this question

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Brian Sullivan
Brian Sullivan

Level 3 Expert

27725 Answers

kakima

Level 3 Expert

102366 Answers

David Payne
David Payne

Level 3 Expert

14161 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...