<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-3509162107510152399</id><updated>2012-01-05T08:19:30.666-08:00</updated><category term='Visual Basic'/><category term='Visual Basic Programms'/><category term='Visual basic Project'/><category term='Visual basic Database connectivity with Access'/><category term='Visual basic Database connectivity with Oracle'/><category term='Visual Basic Tricks and Tips'/><title type='text'>VB Tutor..</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default?start-index=101&amp;max-results=100'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>151</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8395510691155086855</id><published>2011-05-02T03:46:00.000-07:00</published><updated>2011-05-02T03:47:05.676-07:00</updated><title type='text'>Determines the number of workdays within a date range in visual basic</title><content type='html'>&lt;span style="font-family: verdana;"&gt;I used implicit If Statements (IIF) because they take less lines of code, and this procedure is convoluted&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;enough without making is bigger! In case you aren't familiar with them, they are a hold-over from VBA.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The first argument is the expression, the second is what to do if it's true, the third is what to do if it's false.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The first part determines the number of days between 2 dates. The second part determines the number of &lt;/span&gt;&lt;span style="font-family: verdana;"&gt;whole weeks because each whole week has a Saturday &amp;amp; a Sunday in it. &lt;/span&gt;&lt;span style="font-family: verdana;"&gt;The last part determines if the range spanned a weekend but not a whole week so it can subtract the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;weekend out.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub FindWorkDays()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim A1 As Date&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim A2 As Date&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim iWorkDays As Integer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    A1 = Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    A2 = Text2.Text&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    iWorkDays = A2 - A1 + 1 - Int((A2 - A1 + 1) / 7) * 2 - _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    IIf(Int((A2 - A1 + 1) / 7) = (A2 - A1 + 1) / 7, 0, _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    IIf(WeekDay(A2) &amp;lt; WeekDay(A1), 2, 0)) - _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    IIf((WeekDay(A1) = 1 Or WeekDay(A2) = 7), 1, 0)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Label1.Caption = iWorkDays&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8395510691155086855?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8395510691155086855/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8395510691155086855' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8395510691155086855'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8395510691155086855'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/determines-number-of-workdays-within.html' title='Determines the number of workdays within a date range in visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-6202842151320083152</id><published>2011-05-02T03:45:00.001-07:00</published><updated>2011-05-02T03:45:52.566-07:00</updated><title type='text'>To Pause your application for a length of time without a timer control</title><content type='html'>&lt;span style="font-family: verdana;"&gt;First put this code either in a module as a private function on a form&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Public Declare Sub Sleep Lib "kernel32.dll" (ByVal dwMilliseconds As Long)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Then when you want to pause something just do this&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Sleep 1000 'Pause for 1 second&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-6202842151320083152?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/6202842151320083152/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=6202842151320083152' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6202842151320083152'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6202842151320083152'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/to-pause-your-application-for-length-of.html' title='To Pause your application for a length of time without a timer control'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4250334561275446719</id><published>2011-05-02T03:35:00.000-07:00</published><updated>2011-05-02T03:36:23.451-07:00</updated><title type='text'>Crystal Report  in Visual basic</title><content type='html'>Crystal Report is a Report Writer that comes with the professional  edition  of  Visual&lt;br /&gt;Basic.  It is used to perform the following functions.&lt;br /&gt;&lt;br /&gt;1. Design how the report looks&lt;br /&gt;2. Add groupings that break every time the data in this group is changed.&lt;br /&gt;3. Add subtotals based on these groupings, if desired.&lt;br /&gt;&lt;br /&gt;     The Report Writer is designed in two steps.&lt;br /&gt;&lt;br /&gt;1.Design the report layout in the crystal reports design environment.&lt;br /&gt;Write  code  in  your  Visual  Basic  application  that  runs  the  report  designed  in  the&lt;br /&gt;previous step.&lt;br /&gt;2.      To  access  the  design  environment    -  simply  click  the  Add  –  Ins  |  Report  Designer&lt;br /&gt;menu  option.  This  brings  up  two  registration  screen  which  contains  information  for&lt;br /&gt;registering&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4250334561275446719?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4250334561275446719/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4250334561275446719' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4250334561275446719'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4250334561275446719'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/crystal-report-in-visual-basic.html' title='Crystal Report  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5826002525126143476</id><published>2011-05-02T03:33:00.000-07:00</published><updated>2011-05-02T03:34:06.398-07:00</updated><title type='text'>Creating formulas in data reports  in Visual basic</title><content type='html'>&lt;div style="text-align: justify;"&gt;If you want to create a formula to calculate numeric values, compare one value to&lt;br /&gt;another and select alternative actions based on the comparison, join multiple text&lt;br /&gt;strings into a single string, make data calculations or comparisons, etc.:&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1 Click  the  Insert  Formula  button  on the  button  bar.  The  Insert  Formula  dialog  box&lt;br /&gt;appears.&lt;br /&gt;2 Enter a name for your formula and click OK. The Formula Editor appears. Use the&lt;br /&gt;Formula Editor to create, test and modify your formula.&lt;br /&gt;3 Enter fields, operators, and functions into the Formula text box by double-clicking&lt;br /&gt;them  in  their  respective  list  boxes.  You  can  get  complete  information  on  each&lt;br /&gt;available Function and Operator via the Help button.&lt;br /&gt;&lt;br /&gt;Note Each formula is a text string that can be typed directly in to the Formula text&lt;br /&gt;box as well as selecting components from the list boxes.&lt;br /&gt;&lt;br /&gt;4 When finished editing, click the Accept button. Crystal Reports checks the formula&lt;br /&gt;syntax, and if correct, closes the Formula Editor.&lt;br /&gt;5 Place the formula field where you want it to appear in your report.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5826002525126143476?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5826002525126143476/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5826002525126143476' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5826002525126143476'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5826002525126143476'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/creating-formulas-in-data-reports-in.html' title='Creating formulas in data reports  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-6224084408062654506</id><published>2011-05-02T03:32:00.000-07:00</published><updated>2011-05-02T03:33:23.609-07:00</updated><title type='text'>Adding a graph, chart to crystal report  in Visual basic</title><content type='html'>&lt;div style="text-align: justify;"&gt;Crystal Reports enables you to include sophisticated, colorful charts and graphs in&lt;br /&gt;your reports.&lt;br /&gt;When you add a graph to your report, you are graphing summary and subtotal&lt;br /&gt;information. Before you can add a graph, therefore, you must have at least one group&lt;br /&gt;and one summary or subtotal in your report. For example, if you have a sales report&lt;br /&gt;grouped by State and a subtotal of Last Year’s Sales for each State, you can quickly&lt;br /&gt;create a graph that will display sales by state.&lt;br /&gt;Adding and modifying your graphs is easy in Crystal Reports with the use of the&lt;br /&gt;Graph/Chart Expert. Use the Expert every time you create or modify graphs. The&lt;br /&gt;Expert walks you through the creation of your graphs step-by-step.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;1 Click the Insert Chart button on the button bar to access the Graph/Chart Expert.&lt;br /&gt;&lt;br /&gt;Types&lt;br /&gt;&lt;br /&gt;Tab&lt;br /&gt;&lt;br /&gt;When you begin creating your graphs,  you will  need to choose one of the many&lt;br /&gt;graph types available. To select a graph type, click the button that corresponds to&lt;br /&gt;the graph type you want.&lt;br /&gt;&lt;br /&gt;Data&lt;br /&gt;&lt;br /&gt;Tab&lt;br /&gt;&lt;br /&gt;In the Data Tab, select what data you want to graph on, how often you want it to&lt;br /&gt;print (dependent on where you want it displayed), and what you want to show in&lt;br /&gt;the graph.&lt;br /&gt;The  graph  on  drop-down  box  displays  all  the  summaries  and  subtotals  on  your&lt;br /&gt;report. Simply select which one you want to base your graph on.&lt;br /&gt;&lt;br /&gt;Text&lt;br /&gt;&lt;br /&gt;Tab&lt;br /&gt;&lt;br /&gt;The  Text  Tab  allows  you  to  enter  labels  for  your  graph  by  inserting  titles,&lt;br /&gt;footnotes,  and  axis  titles  when  appropriate.  Simply  type  the  text  into  the&lt;br /&gt;corresponding  boxes.  The  program  will  only  use  the  labels  appropriate  for  the&lt;br /&gt;graph type that you chose earlier. The others will be ignored.&lt;br /&gt;&lt;br /&gt;Options&lt;br /&gt;&lt;br /&gt;Tab&lt;br /&gt;&lt;br /&gt;The  Options  Tab  enables  you  to  place  a  legend  on  your  graph,  a  maximum  or&lt;br /&gt;minimum limit on the graph values, or a number of other options.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;OLE Objects&lt;br /&gt;Crystal Reports is an OLE container application. Thus it allows you to place OLE&lt;br /&gt;objects in your report. To do this:&lt;br /&gt;1 Choose the Object command from the Insert menu.&lt;br /&gt;2 Insert an existing object by choosing  the  Create  from file option  and  selecting  the&lt;br /&gt;desired  object, or  create  a  new object  by  choosing  the  Create  New option  then  an&lt;br /&gt;object  type.  The  corresponding  application  will  open  where  you  can  create  the&lt;br /&gt;object as desired.&lt;br /&gt;3 If  you  want to  edit  the object,  simply  double-click  it  and  the  program  in  which  it&lt;br /&gt;was created (or a similar application that allows such editing) will open.&lt;br /&gt;4 Modify the object as desired, save it and Crystal Reports automatically updates the&lt;br /&gt;object in your report.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-6224084408062654506?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/6224084408062654506/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=6224084408062654506' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6224084408062654506'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6224084408062654506'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/adding-graph-chart-to-crystal-report-in.html' title='Adding a graph, chart to crystal report  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7856198029073275289</id><published>2011-05-02T03:31:00.001-07:00</published><updated>2011-05-02T03:31:51.999-07:00</updated><title type='text'>Variables Used by All Modules  in Visual basic</title><content type='html'>To make a module-level variable available to other modules, use the Public&lt;br /&gt;keyword to declare the variable. The values in public variables are available to&lt;br /&gt;all procedures in your application. Like all module-level variables, public&lt;br /&gt;variables are declared in the Declarations section at the top of the module. For&lt;br /&gt;example:&lt;br /&gt;Public intTemp As Integer&lt;br /&gt;&lt;br /&gt;Note      You  can't  declare  public  variables  within  a  procedure,  only  within  the&lt;br /&gt;Declarations section of a module.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7856198029073275289?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7856198029073275289/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7856198029073275289' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7856198029073275289'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7856198029073275289'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/variables-used-by-all-modules-in-visual.html' title='Variables Used by All Modules  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-6627697798943234680</id><published>2011-05-02T03:30:00.001-07:00</published><updated>2011-05-02T03:30:58.942-07:00</updated><title type='text'>Variables Used Within a Module  in Visual basic</title><content type='html'>&lt;span style="font-family: courier new;"&gt;By default, a module-level variable is available to all the procedures in that&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;module, but not to code in other modules. You create module-level variables by&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;declaring them with the Private keyword in the Declarations section at the top of&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;the module. For example:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private intTemp As Integer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;At the module level, there is no difference between Private and Dim, but Private&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;is preferred because it readily contrasts with Public and makes your code easier&lt;/span&gt; &lt;span style="font-family: courier new;"&gt;to understand.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-6627697798943234680?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/6627697798943234680/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=6627697798943234680' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6627697798943234680'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6627697798943234680'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/variables-used-within-module-in-visual.html' title='Variables Used Within a Module  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-312043116613625516</id><published>2011-05-02T03:28:00.000-07:00</published><updated>2011-05-02T03:29:21.786-07:00</updated><title type='text'>Passing Arguments By Reference in VB</title><content type='html'>&lt;span style="font-family: verdana;"&gt;Passing arguments by reference gives the procedure access to the actual variable&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;contents in its memory address location. As a result, the variable's value can be&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;permanently changed by the procedure to which it is passed. Passing by&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;reference is the default in Visual Basic.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;If you specify a data type for an argument passed by reference, you must pass a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;value of that type for the argument. You can work around this by passing an&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;expression, rather than a data type, for an argument. Visual Basic evaluates an&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;expression and passes it as the required type if it can.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The simplest way to turn a variable into an expression is to enclose it in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;parentheses. For example, to pass a variable declared as an integer to a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;procedure expecting a string as an argument, you would do the following:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Sub CallingProcedure()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim intX As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;intX = 12 * 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Foo(intX)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Sub Foo(Bar As String)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox Bar 'The value of Bar is the string "36".&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-312043116613625516?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/312043116613625516/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=312043116613625516' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/312043116613625516'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/312043116613625516'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/passing-arguments-by-reference-in-vb.html' title='Passing Arguments By Reference in VB'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8733547432069909690</id><published>2011-05-02T03:27:00.001-07:00</published><updated>2011-05-02T03:27:59.724-07:00</updated><title type='text'>Adding Methods to the Object in Vb</title><content type='html'>&lt;div style="text-align: justify;"&gt;Add a new subroutine to the class module.   This sub must be publicly available&lt;br /&gt;and named deposit.  Add code to the new method to increase the balance by a&lt;br /&gt;given amount.&lt;br /&gt;Add a new function to the class module.   This function should be publicly&lt;br /&gt;available and named withdraw.   Add code to the new method to decrease the&lt;br /&gt;balance by a given amount.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8733547432069909690?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8733547432069909690/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8733547432069909690' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8733547432069909690'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8733547432069909690'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/adding-methods-to-object-in-vb.html' title='Adding Methods to the Object in Vb'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1933000725032981528</id><published>2011-05-02T03:25:00.000-07:00</published><updated>2011-05-02T03:27:13.525-07:00</updated><title type='text'>Methods of Interfacing with the jet Database Engine</title><content type='html'>&lt;div style="text-align: justify; font-family: verdana;"&gt;Visual Basic provides two methods of interfacing with the Jet database engine: the Data control and data access objects.  While the Data control gives you limited ability to access existing databases without programming, the DAO model is a complete programming interface that gives you total control of the database. These two methods are not mutually exclusive; in fact, there are many situations where you will want to use both of them together.&lt;br /&gt;     The DAO model is a collection of object classes that model the structure of a&lt;br /&gt;relational database system. They provide properties and methods that allow you&lt;br /&gt;to accomplish all of the operations necessary to manage such a system, including&lt;br /&gt;facilities for creating databases, defining tables, fields and indexes, establishing&lt;br /&gt;relations between tables, navigating and querying the database, and so on.&lt;br /&gt;     The Jet database engine translates these operations on data access objects&lt;br /&gt;into physical operations on the database files themselves, handling all the&lt;br /&gt;mechanics of interfacing with the different supported databases.&lt;br /&gt;     Database programming in Visual Basic consists of creating data access&lt;br /&gt;objects, such as Database, TableDef, Field, and Index objects, that correspond to&lt;br /&gt;the various parts of the physical database you want to access. You use the&lt;br /&gt;properties and methods of these objects to perform operations on the database.&lt;br /&gt;You can display the results of these operations and accept input from the user on&lt;br /&gt;Visual Basic forms, using both bound and unbound controls.&lt;br /&gt;     This approach simplifies the code you need to write and insulates you from&lt;br /&gt;the underlying structure and mechanics of retrieving and updating data. It gives&lt;br /&gt;you great flexibility, because you can use the same objects, properties, and&lt;br /&gt;methods to work with a wide variety of supported database formats. Also, if you&lt;br /&gt;change from one database format to another (for example, porting a local&lt;br /&gt;Microsoft Access database to a SQL Server database on a network), you'll need&lt;br /&gt;to make few changes in your code to accommodate the change. You can even&lt;br /&gt;create applications that join tables from two or more different databases in a&lt;br /&gt;single query or report.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1933000725032981528?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1933000725032981528/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1933000725032981528' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1933000725032981528'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1933000725032981528'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/methods-of-interfacing-with-jet.html' title='Methods of Interfacing with the jet Database Engine'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8003049025091693206</id><published>2011-05-02T03:24:00.000-07:00</published><updated>2011-05-02T03:25:23.593-07:00</updated><title type='text'>Data Manipulation (DML)  in Visual basic</title><content type='html'>&lt;div style="text-align: justify;"&gt;DML consists of the properties and methods that you use to write applications&lt;br /&gt;that access and manipulate existing databases. This includes facilities for&lt;br /&gt;querying the database, navigating through its tables, performing updates, and&lt;br /&gt;adding or deleting records.&lt;br /&gt;If you are working exclusively with databases that have already been created by&lt;br /&gt;another application, it is possible to create applications entirely within the DML&lt;br /&gt;functionality. Understanding the DDL methods, however, will add to your&lt;br /&gt;knowledge of database structure and make you a more flexible database&lt;br /&gt;programmer&lt;br /&gt;There are many ways of organizing databases. Among the most popular are&lt;br /&gt;indexed sequential access method (ISAM) file systems, network-model&lt;br /&gt;databases, hierarchical databases, and relational databases. These types of&lt;br /&gt;databases differ not only in the way they physically manage the storage and&lt;br /&gt;retrieval of data, but also in the conceptual models they present to the user and&lt;br /&gt;programmer.&lt;br /&gt;In recent years, the relational model has generally become the de facto standard&lt;br /&gt;for database design. This is due both to the power of the relational model itself,&lt;br /&gt;and because it provides a standard interface called Structured Query Language&lt;br /&gt;(SQL) that allows many different database tools and products to work together&lt;br /&gt;in a consistent and understandable way. The Microsoft Jet database engine is a&lt;br /&gt;relational database engine.&lt;br /&gt;The relational database model presents the data as a collection of tables. Instead&lt;br /&gt;of  modeling  the  relationships  in  the  data  according  to  the  way  that  it  is&lt;br /&gt;physically  stored,  the  structure  is  defined  by  establishing  relations  between&lt;br /&gt;simple tables.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8003049025091693206?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8003049025091693206/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8003049025091693206' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8003049025091693206'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8003049025091693206'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/data-manipulation-dml-in-visual-basic.html' title='Data Manipulation (DML)  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5622792969706759058</id><published>2011-05-02T03:23:00.000-07:00</published><updated>2011-05-02T03:24:35.334-07:00</updated><title type='text'>Database Normalization in VB  in Visual basic</title><content type='html'>&lt;div style="text-align: justify; font-family: verdana;"&gt;The  task  of  the  database  designer  is  to  structure  the  data  in  a  way  that&lt;br /&gt;eliminates  unnecessary  duplication  and  provides  a  rapid  search  path  to  all&lt;br /&gt;necessary  information.  The  process  of  dividing  the  information  into  separate&lt;br /&gt;tables that meet these goals is called normalization.&lt;br /&gt;Normalization  can  be  a  complex  process  with  many  specific  rules  and  different levels of normal form.  For a complete discussion of the process one must refer to advanced  books.  However,  normalizing  most  simple  databases  can  be&lt;br /&gt;accomplished by  following  a  simple  rule  of  thumb:  tables  that  contain  repeated information should be divided into separate tables to eliminate the duplication.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5622792969706759058?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5622792969706759058/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5622792969706759058' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5622792969706759058'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5622792969706759058'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/database-normalization-in-vb-in-visual.html' title='Database Normalization in VB  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7789344772986933822</id><published>2011-05-02T03:22:00.002-07:00</published><updated>2011-05-02T03:23:15.517-07:00</updated><title type='text'>designates  a  field  as  a  foreign  key</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;If  the  foreign  table's primary  key  consists  of  more  than  one  field,  you  must  use  a  multiple-field index  definition,  listing  all  of  the  referencing  fields,  the  name  of  the  foreign&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;table,  and the  names  of  the  referenced  fields  in  the  foreign  table  in  the  same&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;order that the referencing fields are listed. If the referenced field or  fields are&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;the foreign table's primary key, you don't have to specify the referenced fields&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;by  default the  Jet  engine  behaves  as  if  the  foreign  table's  primary  key  is  the&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;referenced fields.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7789344772986933822?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7789344772986933822/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7789344772986933822' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7789344772986933822'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7789344772986933822'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/designates-field-as-foreign-key.html' title='designates  a  field  as  a  foreign  key'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4560488181536231453</id><published>2011-05-02T03:22:00.001-07:00</published><updated>2011-05-02T03:22:32.023-07:00</updated><title type='text'>designates one field or set of fields in a table as a primary key</title><content type='html'>All values in the primary  key must be unique, and there can be only one&lt;br /&gt;primary  key  for  a  table.  If  you  set  a  PRIMARY  KEY  constraint  on  a  table&lt;br /&gt;that already has a primary key, an error occurs.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4560488181536231453?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4560488181536231453/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4560488181536231453' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4560488181536231453'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4560488181536231453'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/designates-one-field-or-set-of-fields.html' title='designates one field or set of fields in a table as a primary key'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3737163871026502128</id><published>2011-05-02T03:21:00.000-07:00</published><updated>2011-05-02T03:22:01.372-07:00</updated><title type='text'>field  as  a  unique  key</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;This  means  that  no  two records  in  the  table  can  have  the  same  value  in  this  field.  You  can  constrain any field or  list of fields as unique. If a multiple-field index is designated  as  a&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;unique key, the combined values of all fields in the index must be unique, even&lt;/span&gt;&lt;span style="font-family: verdana;"&gt;if two or more records have the same value in just one of the fields.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3737163871026502128?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3737163871026502128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3737163871026502128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3737163871026502128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3737163871026502128'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/field-as-unique-key.html' title='field  as  a  unique  key'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5051456272729162577</id><published>2011-05-02T03:19:00.000-07:00</published><updated>2011-05-02T03:20:31.650-07:00</updated><title type='text'>Using Visual Basic Variables in an SQL Statement</title><content type='html'>&lt;div style="text-align: justify;"&gt;In a Visual Basic program, you can create a SELECT statement in your&lt;br /&gt;application by concatenating local variables into the statement as needed to&lt;br /&gt;select, sort, or filter the data as dictated by your application. For example, if you&lt;br /&gt;have a TextBox control (TitleWanted) containing the name of a Title and you&lt;br /&gt;want to fetch all books from the Titles table with this title, you can create an&lt;br /&gt;SQL statement that includes the current value of the TextBox. Note that the&lt;br /&gt;SQL query encloses the TitleWanted value in single quotation marks (' '):&lt;br /&gt;Set Rst = Db.OpenRecordset("SELECT * FROM Titles " _&lt;br /&gt;&amp;amp; " WHERE Title = '" &amp;amp; TitleWanted.T&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The  procedure  for  creating  a  new  Jet  database  is  simply  a  process  of  creating&lt;br /&gt;and  defining  data  access  objects  that  correspond  to  the  tables,  fields,  indexes,&lt;br /&gt;and  relations  of  your  database  design.  In  this  overview,  the  process  will  be&lt;br /&gt;presented  step-by-step,  followed  by  a  complete  code  example  for  creating  the&lt;br /&gt;Biblio.mdb  database.&lt;br /&gt;The first step in creating a new database is to create the Database object itself,&lt;br /&gt;and to define its structure by adding TableDef and Field objects that correspond&lt;br /&gt;to your design.&lt;br /&gt;&lt;br /&gt;To create a new database&lt;br /&gt;1 Use  the  Dim  statement  to  create  new  object  variables  for  each  object  in  your&lt;br /&gt;database.  In  addition  to  the  DBEngine  and  default  Workspace  objects  that&lt;br /&gt;make up the working environment, you will need:&lt;br /&gt;One Database object&lt;br /&gt;One TableDef object for each table&lt;br /&gt;One Field object for each field in each table&lt;br /&gt;One Index object for each index in each table&lt;br /&gt;For example, to create object variables for the Biblio.mdb database, you could&lt;br /&gt;use the following code:&lt;br /&gt;Dim MyDB As Database, MyWs As Workspace&lt;br /&gt;Dim AuTd As TableDef, TitTd As TableDef, _&lt;br /&gt;PubTd As tableDef&lt;br /&gt;Dim AuFlds(2) As Field, TitFlds(5) _&lt;br /&gt;As Field, PubFlds(10) As Field&lt;br /&gt;Dim AuIdx As Index, TitIdx(3) As Index, _&lt;br /&gt;PubIdx As Index&lt;br /&gt;&lt;br /&gt;2 Use  the  CreateDatabase  method  of  the  Workspace  object  to  create  the  new&lt;br /&gt;database. In this example, the method uses the minimum two arguments: one&lt;br /&gt;to specify the database name, and one to specify the locale:&lt;br /&gt;Set MyWs = DBEngine.Workspaces(0)&lt;br /&gt;Set MyDb = MyWs.CreateDatabase("C:\VB\Biblio.mdb", _&lt;br /&gt;dbLangGeneral, dbVersion30)&lt;br /&gt;&lt;br /&gt;Note that the constant dbVersion30 specifies a Jet version 3.0 database. If you&lt;br /&gt;use  the  dbVersion30  constant  to  create  a  version  3.0  database,  only  32-bit&lt;br /&gt;applications using the Jet version 3.0 engine or higher will be able to access it.&lt;br /&gt;3 Use  the  CreateTableDef  method  of  the  Database  object  to  create  new&lt;br /&gt;TableDef objects for each table in the database, as follows:&lt;br /&gt;Set TitTd = MyDB.CreateTableDef("Titles")&lt;br /&gt;Set AuTd = MyDB.CreateTableDef("Authors")&lt;br /&gt;Set PubTd = MyDB.CreateTableDef("Publishers")&lt;br /&gt;&lt;br /&gt;4 Use the CreateField method of the TableDef object to create new Field objects&lt;br /&gt;for  each  field  in  the  table,  and  to  set  properties  of  each  field  to  define  the&lt;br /&gt;field's size, data type, and other needed attributes. For example, the following&lt;br /&gt;code creates the Authors table in the Biblio.mdb database:&lt;br /&gt;Set AuFlds(0) = AuTd.CreateField("Au_ID", dbLong)&lt;br /&gt;' Make it a counter field.&lt;br /&gt;AuFlds(0).Attributes = dbAutoIncrField&lt;br /&gt;Set AuFlds(1) = MyTd.CreateField("Author", dbText)&lt;br /&gt;AuFlds(1).Size = 50&lt;br /&gt;&lt;br /&gt;5 Use  the  Append  method  to  add  each  field  to  its  table  and  each  table  to  the&lt;br /&gt;database, as shown in the following code:&lt;br /&gt;AuTd.Fields.Append AuFlds(0)&lt;br /&gt;AuTd.Fields.Append AuFlds(1)&lt;br /&gt;MyDB.TableDefs.Append AuTd&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5051456272729162577?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5051456272729162577/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5051456272729162577' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5051456272729162577'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5051456272729162577'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/using-visual-basic-variables-in-sql.html' title='Using Visual Basic Variables in an SQL Statement'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4267871510724929650</id><published>2011-05-02T03:18:00.000-07:00</published><updated>2011-05-02T03:19:11.586-07:00</updated><title type='text'>Access from your application to a data source is through a connection ADO</title><content type='html'>&lt;div style="text-align: justify;"&gt;The object model embodies the concept of a connection with the Connection object.&lt;br /&gt;&lt;br /&gt;A transaction delimits the beginning and end of a series of data access operations&lt;br /&gt;that transpire across a connection. ADO ensures that changes to a data source&lt;br /&gt;resulting from operations in a transaction either all occur successfully, or not at all.&lt;br /&gt;If you cancel the transaction or one of its operations fails, then the ultimate result&lt;br /&gt;will be as if none of the operations in the transaction had occurred. The data source&lt;br /&gt;will be as it was before the transaction began.&lt;br /&gt;&lt;br /&gt;The object model does not explicitly embody the concept of a transaction, but&lt;br /&gt;represents it with a set of Connection object methods.&lt;br /&gt;&lt;br /&gt;ADO accesses data and services from OLE DB providers. The Connection object is&lt;br /&gt;used to specify a particular provider and any parameters. For example, Remote&lt;br /&gt;Data Service (RDS) can be invoked explicitly or it can be invoked implicitly with the&lt;br /&gt;"MS Remote" provider.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4267871510724929650?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4267871510724929650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4267871510724929650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4267871510724929650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4267871510724929650'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/access-from-your-application-to-data.html' title='Access from your application to a data source is through a connection ADO'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-6565509659265000402</id><published>2011-05-02T03:17:00.000-07:00</published><updated>2011-05-02T03:18:14.676-07:00</updated><title type='text'>Basic ADO Programming Model  in Visual basic</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;ADO provides the means for you to perform the following sequence of actions:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1.    Connect to a data source. Optionally, you can ensure that all changes to the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;data source occur either successfully or not at all.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;2.    Specify a command to gain access to the data source, optionally with variable&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;parameters, or optionally optimized for performance.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;3.    Execute the command.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;4.    If the command causes data to be returned in the form of rows in a table,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;store the rows in a cache that you can easily examine, manipulate, or change.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;5.    If appropriate, update the data source with changes from the cache of rows.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;6.    Provide a general means to detect errors (usually as a result of making a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;connection or executing a command).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Typically, you will employ all these steps in the programming model. However, it's&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;worth noting that ADO is flexible enough that you can do useful work by executing&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;just part of the model. For example, you could store data from a file directly into a&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;cache of rows, then use ADO resources merely to examine the data.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-6565509659265000402?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/6565509659265000402/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=6565509659265000402' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6565509659265000402'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6565509659265000402'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/basic-ado-programming-model-in-visual.html' title='Basic ADO Programming Model  in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4351841387260307915</id><published>2011-05-02T03:16:00.001-07:00</published><updated>2011-05-02T03:16:37.553-07:00</updated><title type='text'>The RDS Object Model Summary in Visual basic</title><content type='html'>&lt;span style="font-family: courier new;"&gt;RDS.DataSpace&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;RDSServer.DataFactory&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;RDS.DataControl&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Description&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;This object only contains a method to obtain a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;server proxy. The proxy may be the default or a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;custom server program (business object). The&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;server program may be invoked on the Internet, an&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;intranet, or local area network, or be a local&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;dynamic-link library.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;This object represents the default server program.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;It executes the default RDS data retrieval and&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;update behavior.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;•    This object can automatically invoke the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;RDS.DataSpace and&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;RDSServer.DataFactory objects.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;•    Use this object to invoke the default RDS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;data retrieval or update behavior.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;•    This object also provides the means for&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;visual controls to access the returned&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Recordset object.&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4351841387260307915?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4351841387260307915/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4351841387260307915' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4351841387260307915'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4351841387260307915'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/rds-object-model-summary-in-visual.html' title='The RDS Object Model Summary in Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5624653641955407449</id><published>2011-05-02T03:14:00.000-07:00</published><updated>2011-05-02T03:15:55.969-07:00</updated><title type='text'>RDS Programming Model with Objects in VB Visual baisc</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;The goal of RDS is to gain access to and update data sources through an&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;intermediary like the Internet Information Server. The programming model&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;specifies the sequence of activities necessary to accomplish this goal. The object&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;model specifies the objects whose methods and properties affect the programming&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;model.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;RDS provides the means to perform the following sequence of actions:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;13. Specify the program to be invoked on the server, and obtain a way (proxy) to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;refer to it from the client. (RDS.DataSpace)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;14. Invoke the server program. Pass parameters to the server program that&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;identify the data source and the command to issue. (proxy or&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;RDS.DataControl)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;15. The server program obtains a Recordset object from the data source,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;typically by using ADO. Optionally, the Recordset object is processed on the&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;server. (RDSServer.DataFactory)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;16. The server program returns the final Recordset object to the client&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;application. (proxy)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;17. On the client, the Recordset object is put into a form that can be easily used&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;by visual controls. (visual control and RDS.DataControl)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;18. Changes to the Recordset object are sent back to the server and used to&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;update the data source. (RDS.DataControl or RDSServer.DataFactory)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5624653641955407449?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5624653641955407449/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5624653641955407449' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5624653641955407449'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5624653641955407449'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/rds-programming-model-with-objects-in.html' title='RDS Programming Model with Objects in VB Visual baisc'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-691954251309675872</id><published>2011-05-02T03:12:00.000-07:00</published><updated>2011-05-02T03:14:29.025-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>Creatiung forms during Run Time in visual basic</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim x As New frmTest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    x.Caption = "Test Form" &amp;amp; Forms.Count&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    x.Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command2_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    MsgBox "The Forms collection contains " &amp;amp; Forms.Count &amp;amp; " loaded forms."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command3_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim iLoop As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    For iLoop = Forms.Count - 1 To 0 Step -1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        Unload Forms(iLoop)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Next iLoop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Option Explicit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'Set the Drag icon of the control&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'lstOrginal.DragIcon = imgList.ListImages("DRAG").ExtractIcon&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub lstDestination_DragDrop(Source As Control, X As Single, Y As Single)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Source Is lstOrginal Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    If Source.ListIndex &amp;gt; -1 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        lstDestination.AddItem Source.List(Source.ListIndex)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        Source.RemoveItem Source.ListIndex&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub lstOrginal_MouseDown(Button As Integer, Shift As Integer, X As Single, Y&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;As Single)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lstOrginal.Drag vbBeginDrag&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub lstOrginal_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Single)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lstOrginal.Drag vbEndDrag&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-691954251309675872?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/691954251309675872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=691954251309675872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/691954251309675872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/691954251309675872'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/creatiung-forms-during-run-time-in.html' title='Creatiung forms during Run Time in visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-728233923774566737</id><published>2011-05-02T03:11:00.000-07:00</published><updated>2011-05-02T03:12:39.066-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><title type='text'>Calling a DLL Procedure in visual baisc</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Option Explicit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Declare Function GetComputerNameA Lib "kernel32" _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    (ByVal lpBuffer As String, nSize As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Declare Function WNetGetUserA Lib "mpr" _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    (ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Declare Function GetWinDir Lib "kernel32" Alias "GetWindowsDirectoryA" _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    (ByVal lpBuffer As String, ByVal nSize As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdGetComputerName_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim strBuffer As String, lResult As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strBuffer = String(255, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lResult = GetComputerNameA(strBuffer, Len(strBuffer))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    If lResult &amp;lt;&amp;gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        strBuffer = Left(strBuffer, InStr(strBuffer, vbNullChar) - 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        txtGetComputerName.Text = strBuffer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdGetUserName_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim strUserName As String, lResult As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strUserName = String(255, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lResult = WNetGetUserA(vbNullString, strUserName, Len(strUserName))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    If lResult = 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        strUserName = Left$(strUserName, InStr(strUserName, vbNullChar) - 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        txtGetUserName.Text = strUserName&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdGetWindowsDirectory_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim strWindowsDir As String, lResult As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strWindowsDir = String(255, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lResult = GetWinDir(strWindowsDir, Len(strWindowsDir))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strWindowsDir = Left$(strWindowsDir, lResult)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    txtGetWindowsDirectory.Text = strWindowsDir&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;                    Figure 3a&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Option Explicit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Declare Function GetComputerNameA Lib "kernel32" _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    (ByVal lpBuffer As String, nSize As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Declare Function WNetGetUserA Lib "mpr" _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    (ByVal lpName As String, ByVal lpUserName As String, lpnLength As Long) As&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Declare Function GetWinDir Lib "kernel32" Alias "GetWindowsDirectoryA" _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    (ByVal lpBuffer As String, ByVal nSize As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdGetComputerName_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim strBuffer As String, lResult As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strBuffer = String(255, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lResult = GetComputerNameA(strBuffer, Len(strBuffer))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    If lResult &amp;lt;&amp;gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        strBuffer = Left(strBuffer, InStr(strBuffer, vbNullChar) - 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        txtGetComputerName.Text = strBuffer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdGetUserName_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim strUserName As String, lResult As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strUserName = String(255, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lResult = WNetGetUserA(vbNullString, strUserName, Len(strUserName))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    If lResult = 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        strUserName = Left$(strUserName, InStr(strUserName, vbNullChar) - 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        txtGetUserName.Text = strUserName&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdGetWindowsDirectory_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim strWindowsDir As String, lResult As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strWindowsDir = String(255, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    lResult = GetWinDir(strWindowsDir, Len(strWindowsDir))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    strWindowsDir = Left$(strWindowsDir, lResult)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    txtGetWindowsDirectory.Text = strWindowsDir&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-728233923774566737?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/728233923774566737/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=728233923774566737' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/728233923774566737'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/728233923774566737'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/calling-dll-procedure-in-visual-baisc.html' title='Calling a DLL Procedure in visual baisc'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2035063338109029367</id><published>2011-05-02T03:10:00.000-07:00</published><updated>2011-05-02T03:11:24.416-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual basic Project'/><title type='text'>Project using ImageList Control in visual basic</title><content type='html'>&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:dontvertaligncellwithsp/&gt;    &lt;w:dontbreakconstrainedforcedtables/&gt;    &lt;w:dontvertalignintxbx/&gt;    &lt;w:word11kerningpairs/&gt;    &lt;w:cachedcolbalance/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="--"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="1" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable  {mso-style-name:"Table Normal";  mso-tstyle-rowband-size:0;  mso-tstyle-colband-size:0;  mso-style-noshow:yes;  mso-style-priority:99;  mso-style-qformat:yes;  mso-style-parent:"";  mso-padding-alt:0in 5.4pt 0in 5.4pt;  mso-para-margin:0in;  mso-para-margin-bottom:.0001pt;  mso-pagination:widow-orphan;  font-size:11.0pt;  font-family:"Calibri","sans-serif";  mso-ascii-font-family:Calibri;  mso-ascii-theme-font:minor-latin;  mso-fareast-font-family:"Times New Roman";  mso-fareast-theme-font:minor-fareast;  mso-hansi-font-family:Calibri;  mso-hansi-theme-font:minor-latin;  mso-bidi-font-family:"Times New Roman";  mso-bidi-theme-font:minor-bidi;} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 16.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;Option Explicit&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 16.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;Private Sub cmdLoadBitmap_Click()&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 17.3pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;If Val(txtBitmaps) = 0 Then&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 13.3pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;MsgBox "Enter a number between 1 and 9."&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 14pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;txtBitmaps.SetFocus&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 14pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;Exit Sub&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 14pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;End If&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 16.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;Image2.Picture = imgBitmaps.ListImages(Val(txtBitmaps)).Picture&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 16.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;End Sub&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 17.3pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;Private Sub cmdLoadIcon_Click()&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 16.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;If Val(txtIcons) = 0 Then&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 14pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;MsgBox "Enter a number between 1 and 9."&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 14pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;txtIcons.SetFocus&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 13.3pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;        &lt;/span&gt;Exit Sub&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 14pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;End If&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 16.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;&lt;span style="mso-spacerun:yes"&gt;    &lt;/span&gt;Image1.Picture = imgIcons.ListImages(Val(txtIcons)).Picture&lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 10.65pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="font-size:9.0pt;color:black"&gt; &lt;/span&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-left: 80pt; line-height: 17.3pt; font-family: courier new; font-weight: bold;"&gt;&lt;span style="color:black"&gt;End Sub&lt;/span&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2035063338109029367?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2035063338109029367/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2035063338109029367' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2035063338109029367'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2035063338109029367'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2011/05/project-using-imagelist-control-in.html' title='Project using ImageList Control in visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8012016872043104326</id><published>2010-07-25T08:02:00.000-07:00</published><updated>2010-07-25T08:06:21.223-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual basic Database connectivity with Access'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>Runtime Visual Basic and access Database Connectivity | Retrieving values in Visual basic from Access</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt; Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; Adodc1.ConnectionString = "provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\demo\pop.mdb;Persist Security Info=False"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; Adodc1.RecordSource = "select * from pop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; Set Text1.DataSource = Adodc1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; Set Text2.DataSource = Adodc1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; End Sub&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;On Error Resume Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Adodc1.Recordset.AddNew&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;With Adodc1.Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;.Fields(0) = Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;.Fields(1) = Text2.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End With&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Adodc1.Recordset.Save&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Adodc1.Recordset.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8012016872043104326?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8012016872043104326/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8012016872043104326' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8012016872043104326'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8012016872043104326'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/runtime-visual-basic-and-access.html' title='Runtime Visual Basic and access Database Connectivity | Retrieving values in Visual basic from Access'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7482608029860568594</id><published>2010-07-25T08:00:00.000-07:00</published><updated>2010-07-25T08:01:47.876-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>fibonacci series in visual basic</title><content type='html'>&lt;span style="font-size:100%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Dim i, f1, f2, f3, n As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;n = Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;i = 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;While (i &lt;= n)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;f3 = f1 + f2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;f1 = f2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;f2 = f3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Print f3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7482608029860568594?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7482608029860568594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7482608029860568594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7482608029860568594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7482608029860568594'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/fibonacci-series-in-visual-basic.html' title='fibonacci series in visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4061985563383682035</id><published>2010-07-25T07:53:00.000-07:00</published><updated>2010-07-25T07:57:54.939-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual basic Project'/><title type='text'>Visual Basic connectivity data grid</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim x As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;x = Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Data1.RecordSource = "select * from employees where EmployeeID =" &amp;amp; x&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Data1.Refresh&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4061985563383682035?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4061985563383682035/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4061985563383682035' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4061985563383682035'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4061985563383682035'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/visual-basic-connectivity-data-grid.html' title='Visual Basic connectivity data grid'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7337765374817597627</id><published>2010-07-25T06:55:00.000-07:00</published><updated>2010-07-25T07:49:46.306-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual basic Database connectivity with Oracle'/><title type='text'>Visual basic Database connectivity with Oracle</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim sql As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim rs1 As New Adodb.Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim cn As New Adodb.Connection&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs1.AddNew&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs1.Fields("rno").Value = Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs1.Fields("name").Value = Text2.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs1.Update&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set rs1 = New Adodb.Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cn = New Adodb.Connection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cn.CursorLocation = adUseClient&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cn.Open "provider=msdaora.1;", "scott", "tiger"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;sql = "select * from pop"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs1.Open sql, cn, adOpenDynamic, adLockOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7337765374817597627?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7337765374817597627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7337765374817597627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7337765374817597627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7337765374817597627'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/visual-basic-database-connectivity-with.html' title='Visual basic Database connectivity with Oracle'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-9104423356710456071</id><published>2010-07-25T06:51:00.000-07:00</published><updated>2010-07-25T06:53:17.769-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>creating popup menu in vb6, right click menu in vb6</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Form_MouseUp(Button As Integer, Shift As _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;   Integer, X As Single, Y As Single)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;   If Button = 2 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;                      &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      PopupMenu mnuFile&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;                        &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;   End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-9104423356710456071?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/9104423356710456071/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=9104423356710456071' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/9104423356710456071'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/9104423356710456071'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/creating-popup-menu-in-vb6-right-click.html' title='creating popup menu in vb6, right click menu in vb6'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2424467672643798115</id><published>2010-07-25T06:49:00.001-07:00</published><updated>2010-07-25T06:51:35.309-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>MSFLEX in visual basic</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Public cn As ADODB.Connection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Public rs As ADODB.Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MS.Rows = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text3.Text = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim cmd As ADODB.Command&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim cmdtxt As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cmdtxt = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Me.MousePointer = vbHourglass&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set cn = New ADODB.Connection&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=pop.mdb;Persist Security Info=False"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cn.Open&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set rs = New ADODB.Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.CursorLocation = adUseClient&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.CursorType = adOpenStatic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set cmd = New ADODB.Command&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cmd.CommandType = adCmdText&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set cmd.ActiveConnection = cn&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Option1.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    cmdtxt = "Select * from abc  where name=" &amp;amp; "'" &amp;amp; Text1.Text + "'" + " order by rno"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    If Option2.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;        cmdtxt = "Select * from abc  where rno=" &amp;amp; "'" &amp;amp; Text1.Text + "'" + " order by rno"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cmd.CommandText = cmdtxt&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cmd.Prepared = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set rs = cmd.Execute&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Me.MousePointer = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;''''''''''''''''''''''''''&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim r As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;r = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;''''''''''''''''''''''''''Code For entering Data in MSFLEXgrid&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Do While Not Me.rs.EOF&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      MS.AddItem Me.rs.Fields("RNO").Value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      MS.Row = r&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      MS.Col = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      MS.Text = Me.rs.Fields("name").Value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      'MS.Col = 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;       r = r + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;      Me.rs.MoveNext&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;''''''''''''''&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text3.Text = r - 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Command2.Enabled = False&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Text3.Text = 0 Then MsgBox "not found"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2424467672643798115?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2424467672643798115/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2424467672643798115' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2424467672643798115'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2424467672643798115'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/msflex-in-visual-basic.html' title='MSFLEX in visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-802947203030089689</id><published>2010-07-25T06:45:00.000-07:00</published><updated>2010-07-25T06:49:10.106-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Tricks and Tips'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>InputBox in vb6</title><content type='html'>&lt;span style="font-size:130%;"&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;stranswer = InputBox("what is  ur name", "get name")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If (stranswer = "pop") Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "hello " + stranswer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox stranswer + " Shut up!"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-802947203030089689?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/802947203030089689/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=802947203030089689' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/802947203030089689'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/802947203030089689'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/inputbox-in-vb6.html' title='InputBox in vb6'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8027086992054221293</id><published>2010-07-25T06:42:00.000-07:00</published><updated>2010-07-25T06:45:02.427-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><title type='text'>Area of circle vb tutor.</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim r, b, pi As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;pi = 3.14&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;r = Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;b = pi * (r * r)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Label2.Caption = "The Area is " &amp;amp; b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command3_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Label2.Caption = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8027086992054221293?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8027086992054221293/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8027086992054221293' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8027086992054221293'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8027086992054221293'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/07/area-of-circle-vb-tutor.html' title='Area of circle vb tutor.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1245591053357884490</id><published>2010-05-25T19:21:00.000-07:00</published><updated>2010-05-25T19:23:52.001-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Tricks and Tips'/><title type='text'>Making a form invisible, but leaving (showing) the controls visible</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;This involves using the SetWindowLong API function with the following parameters, &lt;span style="font-family: courier new;"&gt;GWL_EXSTYLE&lt;/span&gt; and &lt;span style="font-family: courier new;"&gt;WS_EX_TRANSPARENT&lt;/span&gt; as constants.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;the syntax of the function using the paramters is&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;dim intresult as long&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;intresult = setwindowlong(me.hwnd, gwl_exstyle, ws_ex_transparent)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;this will make the form referenced by me.hwnd transparent so that the background can be seen but the&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; controls can still be accessed.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1245591053357884490?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1245591053357884490/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1245591053357884490' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1245591053357884490'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1245591053357884490'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/05/making-form-invisible-but-leaving.html' title='Making a form invisible, but leaving (showing) the controls visible'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-350398942319757759</id><published>2010-05-25T19:18:00.000-07:00</published><updated>2010-05-25T19:21:21.419-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Tricks and Tips'/><title type='text'>Program to Display a Form without a Titlebar. (Hide Title Bar)</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Often,  an  application  needs  a  special  window  without  a  title  bar,  the  horizontal&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;bar  at  the  top  of  a  window  that  contains  the  title  of  the  window.  For  instance,  a  splash&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; screen or a custom context sensitive menu are nothing  more  than  VB  forms  without  title&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; bars. To make a form appear without a title bar set the following design-time and run-time&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; properties.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;Properties that must be set at design-time, they are read-only at&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: arial;"&gt;run-time:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;ControlBox=False&lt;/span&gt; &lt;span style="font-family: courier new; font-weight: bold;"&gt;' Turns off Control-menu: Restore, Move, Size,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Minimize, Maximize, Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MaxButton=False&lt;/span&gt; &lt;span style="font-family: courier new; font-weight: bold;"&gt;' Turns off Maximize button&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MinButton=False&lt;/span&gt;    &lt;span style="font-family: courier new; font-weight: bold;"&gt;' Turns off Minimize button&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;ShowInTaskbar=False ' Hides window in Taskbar&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'Properties that can be set at either run-time or design-time:&lt;/span&gt;&lt;br /&gt; &lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Caption=""&lt;/span&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;   ' Blanks window title&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-350398942319757759?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/350398942319757759/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=350398942319757759' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/350398942319757759'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/350398942319757759'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/05/program-to-display-form-without.html' title='Program to Display a Form without a Titlebar. (Hide Title Bar)'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1585322375958901869</id><published>2010-05-25T19:16:00.001-07:00</published><updated>2010-05-25T19:18:05.235-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Tricks and Tips'/><title type='text'>Program to Determines the number of workdays within a date range.</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;I used implicit If Statements (IIF) because they take less lines of code, and this procedure is convoluted enough without making is bigger! In case you aren't familiar with them, they are a hold-over from VBA.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The first argument is the expression, the second is what to do if it's true, the third is what to do if it's false.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The first part determines the number of days between 2 dates. The second part determines the number of whole weeks because each whole week has a Saturday &amp;amp; a Sunday in it.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The last part determines if the range spanned a weekend but not a whole week so it can subtract the weekend out.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub FindWorkDays()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim A1 As Date&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim A2 As Date&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Dim iWorkDays As Integer&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    A1 = Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    A2 = Text2.Text&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    iWorkDays = A2 - A1 + 1 - Int((A2 - A1 + 1) / 7) * 2 - _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    IIf(Int((A2 - A1 + 1) / 7) = (A2 - A1 + 1) / 7, 0, _&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    IIf(WeekDay(A2) &lt;&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    IIf((WeekDay(A1) = 1 Or WeekDay(A2) = 7), 1, 0)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;    Label1.Caption = iWorkDays&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1585322375958901869?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1585322375958901869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1585322375958901869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1585322375958901869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1585322375958901869'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/05/program-to-determines-number-of.html' title='Program to Determines the number of workdays within a date range.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2059461621003758912</id><published>2010-05-25T19:08:00.000-07:00</published><updated>2010-05-25T19:15:57.575-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Programms'/><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic Tricks and Tips'/><title type='text'>How To Pause your application for a length of time without a timer control in vb (Visual basic)</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;First put this code either in a module as a private function on a form&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Public Declare Sub Sleep Lib "kernel32.dll"&lt;br /&gt;(ByVal dwMilliseconds As Long)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;Then when you want to pause something just do this&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Sleep 1000 'Pause for 1 second&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2059461621003758912?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2059461621003758912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2059461621003758912' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2059461621003758912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2059461621003758912'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/05/how-to-pause-your-application-for.html' title='How To Pause your application for a length of time without a timer control in vb (Visual basic)'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7064674102492122763</id><published>2010-02-01T04:44:00.000-08:00</published><updated>2010-02-01T04:48:14.637-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual basic Project'/><title type='text'>Simple Hostel Management system Project In Visual basic</title><content type='html'>&lt;span style="font-weight: bold;font-size:130%;" &gt;&lt;span style="font-family: courier new;"&gt;Dim hrs As Recordset&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub add_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;clr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.AddNew&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub delete_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;a = MsgBox("Do you want to delete record?", vbQuestion + vbYesNo, "Record Deletion")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If a = vbYes Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;st = "delete * from Hostel_Data Where d_no = " &amp;amp; Val(tno) &amp;amp; ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;DB.Execute (st)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.MoveNext&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub first_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.MoveFirst&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Module1.hostel&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Set hrs = DB.OpenRecordset("Hostel_Data", dbOpenTable)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Function clr()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tno = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tname = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tadd = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;trent = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Function display()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tno = hrs.Fields("d_no")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tname = hrs.Fields("d_name")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;tadd = hrs.Fields("d_address")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;trent = hrs.Fields("d_rent")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub last_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.MoveLast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub modify_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Edit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_no") = Val(tno)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_name") = Trim(tname)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_address") = Trim(tadd)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_rent") = Val(trent)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Update&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MsgBox "Record Modified Successfully"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub next_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.MoveNext&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If hrs.EOF = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.MoveLast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;S&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub previous_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.MovePrevious&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;If hrs.BOF = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.MoveFirst&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Sub save_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_no") = Val(tno)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_name") = Trim(tname)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_address") = Trim(tadd)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Fields("d_rent") = Val(trent)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;hrs.Update&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;MsgBox "The record has been succesfully saved"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7064674102492122763?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7064674102492122763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7064674102492122763' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7064674102492122763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7064674102492122763'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/02/simple-hostel-management-system-project.html' title='Simple Hostel Management system Project In Visual basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5162082171139146471</id><published>2010-02-01T04:42:00.000-08:00</published><updated>2010-02-01T04:44:26.973-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Visual Basic'/><title type='text'>Program showing Recordset ADODC  Add, Update Example</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim crs As Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub add_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;clr&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.AddNew&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub delete_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;a = MsgBox("Do you want to delete record?", vbQuestion + vbYesNo, "Record Deletion")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If a = vbYes Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;st = "delete * from courses Where c_id = " &amp;amp; Val(tid) &amp;amp; ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DB.Execute (st)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.MoveNext&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub first_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.MoveFirst&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Module.courses&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set crs = DB.OpenRecordset("courses", dbOpenTable)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Function clr()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tid = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tname = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tfees = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tseats = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Function display()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tid = crs.Fields("c_id")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tname = crs.Fields("c_name")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tfees = crs.Fields("c_fees")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;tseats = crs.Fields("c_seats")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub last_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.MoveLast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub modify_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Edit&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_id") = Val(tid)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_name") = Trim(tname)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_fees") = Val(tfees)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_seats") = Val(tseats)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Update&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "Record Modified Successfully"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub next_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.MoveNext&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If crs.EOF = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.MoveLast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub pre_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.MovePrevious&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If crs.BOF = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.MoveFirst&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;display&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub save_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_id") = Val(tid)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_name") = Trim(tname)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_fees") = Val(tfees)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Fields("c_seats") = Val(tseats)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;crs.Update&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "The record has been succesfully saved"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5162082171139146471?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5162082171139146471/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5162082171139146471' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5162082171139146471'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5162082171139146471'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2010/02/program-showing-recordset-adodc-add.html' title='Program showing Recordset ADODC  Add, Update Example'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2400913137108165722</id><published>2009-12-19T01:53:00.000-08:00</published><updated>2009-12-20T22:35:44.539-08:00</updated><title type='text'>Program to create toolbar contain the following tools. Notepad, Wordpad, Calculator, Windows Explorer, Paint Brush, MS Word, MS PowerPoint</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/Syyi186YFeI/AAAAAAAAAeo/sHatnRIy2pY/s1600-h/28.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 33px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/Syyi186YFeI/AAAAAAAAAeo/sHatnRIy2pY/s320/28.jpg" alt="" id="BLOGGER_PHOTO_ID_5416883499587605986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;Draw flowchart, write an algorithm and program in VB&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;to create the toolbar.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Toolbar should contain the following tools.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;Notepad, Wordpad, Calculator, Windows Explorer, Paint&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;Brush, MS Word, MS PowerPoint, MS Excel.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family:verdana;"&gt;User will click on any of the tools and related application&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;should open.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub Toolbar1_ButtonClick(ByVal Button As&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;MSComctlLib.Button)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Select Case Button.Key&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Case "a"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "notepad"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Case "b"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "C: \ Program&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Files\WindowsNT\Accessories\Wordpad.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Case "c"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "C:\WINDOWS\system32\calc.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Case "d"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "explorer.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Case "e"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "C:\WINDOWS \system32\mspaint.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Case "f"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "C:\Program Files\Microsoft&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;office\Office10\Winword.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Case"g"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "C:\Program Filesl\Microsoft Office\Office10\powerpnt.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Case"h"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Shell "C:\Program Filesl\Microsoft Office\Office10\excel.exe"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;End Select&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2400913137108165722?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2400913137108165722/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2400913137108165722' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2400913137108165722'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2400913137108165722'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/write-algorithm-and-program-in-vb-to.html' title='Program to create toolbar contain the following tools. Notepad, Wordpad, Calculator, Windows Explorer, Paint Brush, MS Word, MS PowerPoint'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7yyVsGPueko/Syyi186YFeI/AAAAAAAAAeo/sHatnRIy2pY/s72-c/28.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3508159779384071157</id><published>2009-12-19T01:50:00.000-08:00</published><updated>2009-12-20T22:34:39.412-08:00</updated><title type='text'>Program to change fonts, font sizes in combo boxes and foreground, background color by using windows common control in Visual Basic</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyiG5TZp1I/AAAAAAAAAeg/qPz7-R5eSWQ/s1600-h/27.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 240px; height: 163px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyiG5TZp1I/AAAAAAAAAeg/qPz7-R5eSWQ/s320/27.jpg" alt="" id="BLOGGER_PHOTO_ID_5416882691164972882" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to enter the string from the user. Display any four fonts, font sizes in combo boxes and foreground, background color by using windows common control. Give the option of bold, italic, underline and strike through in check boxes. User will select any font, size, color, font style and that should be applicable on the text box.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub chkBold_Click()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;txtfont.FontBold = chkBold&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub chkItalic_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;txtfont.FontItalic = chkItalic&lt;br /&gt;End Sub&lt;br /&gt;Private Sub chkUnderline_Click ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;txtfont.FontUnderline = chkUnderline&lt;br /&gt;End Sub&lt;br /&gt;Private Sub chkstrike_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;txtfont.FontStrikethru = chkstrike&lt;br /&gt;End Sub&lt;br /&gt;Private Sub cboName_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;txtfont. FontName = cboName.Text&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;Private Sub cboSize_Click()&lt;br /&gt;txtfont. FontSize = cboSize.Text&lt;br /&gt;End Sub&lt;br /&gt;Private Sub cmdBcolor_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;cdBcolor. ShowColor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;txtfont. BackColor = cdBcolor. Color&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub cmdFcolor_click()&lt;br /&gt;cdFcolor.ShowColor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;txtfont. ForeColor = cdFcolor .Color&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3508159779384071157?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3508159779384071157/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3508159779384071157' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3508159779384071157'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3508159779384071157'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-enter-string-from-user-display.html' title='Program to change fonts, font sizes in combo boxes and foreground, background color by using windows common control in Visual Basic'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyiG5TZp1I/AAAAAAAAAeg/qPz7-R5eSWQ/s72-c/27.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3829022871588898888</id><published>2009-12-19T01:40:00.000-08:00</published><updated>2009-12-19T01:49:59.241-08:00</updated><title type='text'>basic to select a company name, display the names in combo box.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/Syyf0qhVX9I/AAAAAAAAAeY/D3DY_MHDyQI/s1600-h/25.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 174px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/Syyf0qhVX9I/AAAAAAAAAeY/D3DY_MHDyQI/s320/25.jpg" alt="" id="BLOGGER_PHOTO_ID_5416880178935979986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;to select a company name, display the names in combo box.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Company Name: TVS, Hero Honda&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;After selecting the company name the list of corresponding vehicles Should be displayed in combo box.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Vehicle name: TVS-fiero, victor&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;: Hero Honda- Ambition,CBZ.&lt;br /&gt;After selecting vehicle name the list of colors available and their rates should be displayed in combo box.&lt;br /&gt;Colors: fiero- black, Red&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;: victor yellow , blue.&lt;br /&gt;: Ambition black, silver.&lt;br /&gt;: cbz Metallic &amp;amp; black&lt;br /&gt;Price : fiero 50000 Rs.&lt;br /&gt;Victor 45000 Rs.&lt;br /&gt;Ambition 48000 Rs.&lt;br /&gt;CBZ 52000 Rs.&lt;br /&gt;Allow the user to select the bank. After selection the rate of interest should be displayed automatically&lt;br /&gt;Bank: ICICI, HDFC&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Rate of interest : ICICI: 9% HDFC: 9.4%&lt;br /&gt;Allow the user to select the duration. Duration of installment 12,18,24 months.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Input down payment Calculate the balance amount , interest amount and EMI (equal months installments)&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;br /&gt;Dim dp As Integer&lt;br /&gt;Dim emi, amt, roi As Single&lt;br /&gt;Private Sub cboCompany_Click()&lt;br /&gt;cboVehicle. Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;If cboCompany.Text = "TVS" Then&lt;br /&gt;cboVehicle.Addltem "Fiero" ,0&lt;br /&gt;cboVehicle.Addltem "Vector", 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;cboVehicle.Addltem "Ambition",0&lt;br /&gt;cboVehicle.AddItem "CBZ", 1 End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Private Sub cboVehicle_Click()&lt;br /&gt;cboColor. Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;If cboVehicle. Text = "Fiero" Then&lt;br /&gt;cboColor.AddItem "Black", 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;cboColor.AddItem "Red", 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;txtPrice.Text = "50000"&lt;br /&gt;Elself cboVehicle.Text = "Victor" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;cboColor.AddItem "Yellow", 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;cboColor.AddItem "Blue", 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;txtPrice.Text = "45000"&lt;br /&gt;Elself cboVehicle.Text = "Ambition" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;cboColor .Addltem "Black", 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;cboColor.Addltem "Silver", 1 &lt;/span&gt;&lt;br /&gt;   &lt;span style="font-family: verdana;"&gt;txtPrice.Text = "48000"&lt;br /&gt;Else: cboVehicle.Text = "Ambition"&lt;br /&gt;cboColor.Addltem "Metallic", 0&lt;br /&gt;cboColor.Addltem "Black", 1&lt;br /&gt;txtPrice.Text = "52000"&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;cboColor.Text = Clear&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Private Sub optHDFC_Click()&lt;br /&gt;txtrate.Text = "9.4 %" &lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: verdana;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Private Sub optICICI_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;txtrate.Text = "9 %"&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Private Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;txtDPay_Validate (Cancel As Boolean)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;dp = CInt(txtDPay.Text)  &lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: verdana;"&gt; amt = CSng (txtPrice.Text) - dp&lt;br /&gt;txtBalAmt.Text = CStr(amt)&lt;br /&gt;If optICICI. Value = True Then&lt;br /&gt;If opt12.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;emi = ((amt * 9) / 100 + amt) / 12&lt;br /&gt;Elself opt18.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;emi = ((amt * 9) / 100 + (amt * 9) /100 / 2 + amt) / 18&lt;br /&gt;Elself opt24.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;emi = ((amt * 9) / 100 + (amt * 9) / 1000 * 2 + amt) / 24&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;txtEMI. Text = emi&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;If optHDFC.Value = True Then&lt;br /&gt;If opt12.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;emi = ((amt * 9.4) / 100 + amt) / 12&lt;br /&gt;ElseIf opt18.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;emi = ((amt * 9.4) / 100 + (amt * 9.4) / 100 / 2 + amt) 18&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;ElseIf opt24.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;emi = ((amt * 9.4) / 100 + (amt * 9.4) / 1000 * 2 + amt) / 24&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;txtEMI.Text = emi&lt;br /&gt;End If&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3829022871588898888?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3829022871588898888/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3829022871588898888' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3829022871588898888'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3829022871588898888'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-select-company-name-display.html' title='basic to select a company name, display the names in combo box.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7yyVsGPueko/Syyf0qhVX9I/AAAAAAAAAeY/D3DY_MHDyQI/s72-c/25.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2033303527064937361</id><published>2009-12-19T01:35:00.000-08:00</published><updated>2009-12-19T01:40:35.905-08:00</updated><title type='text'>create conditional report without data environment. Table must have fields students id,student name, parent name, address and date of admission.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/SyyevtrJg4I/AAAAAAAAAeQ/y40oC_Lk-YM/s1600-h/24.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 153px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/SyyevtrJg4I/AAAAAAAAAeQ/y40oC_Lk-YM/s320/24.jpg" alt="" id="BLOGGER_PHOTO_ID_5416878994371478402" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/Syyeu08MiQI/AAAAAAAAAeI/u6zKApAa2bo/s1600-h/24.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 118px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/Syyeu08MiQI/AAAAAAAAAeI/u6zKApAa2bo/s320/24.1.jpg" alt="" id="BLOGGER_PHOTO_ID_5416878979142158594" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to create conditional report without data environment. Table must have fields students id,student name, parent name, address and date of admission. Input two dates of admission from the user and display the entire record between the two dates.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim con As New ADODB.Connection&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim stdrs As New ADODB. Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If stdrs.State = adStateOpen Then&lt;br /&gt;stdrs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;stdrs.Open "select * from studtable where date_admission &gt;= #" &amp;amp; DTPicker1.Value &amp;amp; "# and date_admission &lt;= #" &amp;amp; DTPicker2.Value &amp;amp; "#", con, adOpenDynamic, adLockBatchOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If (stdrs.BOF = True And stdrs.EOF = True) Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "Record Not Found........"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set DataReport1.DataSource = stdrs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport1.Sections("Section1") .Controls (1) .DataField = stdrs.Fields(0) .Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport1.Sections("Section1") .Controls (2) .DataField = stdrs.Fields(1) .Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport1.Sections("Section1") .Controls (3) .DataField = stdrs.Fields(2) .Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport1.Sections("Section1") .Controls (4) .DataField = stdrs.Fields(3) .Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;'DataReport1.Sections("Section1") .Controls (5) .DataField = stdrs.Fields(4) .Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'DataReport1.Sections("Section1") .Controls (4) .Caption = DTPicker2.Value&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport1.Show&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Command2_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If con. State = adStateOpen Then&lt;br /&gt;con.Close&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Source=E: \ASSINGMENT\bloodreport.mdb; Persist Security Info=False"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If stdrs.State = adStateOpen Then&lt;br /&gt;stdrs.Close&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;stdrs.Open "select * from studtable", con, adOpenDynamic, adLockBatchOptimistic&lt;br /&gt;DTPicker1.Value = Now()&lt;br /&gt;DTPicker2.Value = Now()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2033303527064937361?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2033303527064937361/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2033303527064937361' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2033303527064937361'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2033303527064937361'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/create-conditional-report-without-data.html' title='create conditional report without data environment. Table must have fields students id,student name, parent name, address and date of admission.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7yyVsGPueko/SyyevtrJg4I/AAAAAAAAAeQ/y40oC_Lk-YM/s72-c/24.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3099364431089395672</id><published>2009-12-19T01:31:00.001-08:00</published><updated>2009-12-19T01:35:31.232-08:00</updated><title type='text'>create a conditional report. Table must have fields donor number, donor name,address,age,and blood group.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_7yyVsGPueko/Syydu4QmWTI/AAAAAAAAAeA/qjiGGsIzVrk/s1600-h/23.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 114px;" src="http://4.bp.blogspot.com/_7yyVsGPueko/Syydu4QmWTI/AAAAAAAAAeA/qjiGGsIzVrk/s320/23.1.jpg" alt="" id="BLOGGER_PHOTO_ID_5416877880521414962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/Syyduq1uEmI/AAAAAAAAAd4/8p2MKTSLrQw/s1600-h/23.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 186px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/Syyduq1uEmI/AAAAAAAAAd4/8p2MKTSLrQw/s320/23.jpg" alt="" id="BLOGGER_PHOTO_ID_5416877876919013986" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to create a conditional report. Table must have fields donor number, donor name,address,age,and blood group. User will input the blood group name and the entire details having that blood group should be                        displayed.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim con As New ADODB.Connection&lt;br /&gt;Dim brs As New ADODB. Recordset&lt;br /&gt;Private Sub Command1_Click()&lt;br /&gt;If brs.State = adStateOpen Then&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs.Open "select * from bloodgroupdetails where blood_group = '" &amp;amp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Combo1.Text &amp;amp; "'", con, adOpenDynamic, adLockBatchOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If (brs.BOF = True And brs.EOF = True) Then&lt;br /&gt;MsgBox "Record Not Found"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Set DataReport2.DataSource = brs&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;DataReport2.Sections("Section1") .Controls (1) .DataField =&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs. Fields(0).Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport2. Sections("Section1") .Controls(2) .DataField =&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs. Fields (1) . Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport2. Sections("Section1") .Controls(3) .DataField =&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs. Fields(2) .Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport2.Sections("Section1") .Controls(4) .DataField =&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs. Fields(3). Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport2. Sections("Section1") .Controls(5) .DataField =&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs. Fields (4).Name&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport2.Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Command2_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If con.State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;con.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;con.Open "Provider = Microsoft.Jet.OLEDB.4.0;Data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Source=E:\ASSINGMENT\bloodreport.mdb;Persist Security Info=False"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If brs.State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If brs. State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;brs.Open "select * from bloodgroupdetails", con, adOpenDynamic,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;adLockBatchOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3099364431089395672?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3099364431089395672/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3099364431089395672' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3099364431089395672'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3099364431089395672'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/create-conditional-report-table-must.html' title='create a conditional report. Table must have fields donor number, donor name,address,age,and blood group.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_7yyVsGPueko/Syydu4QmWTI/AAAAAAAAAeA/qjiGGsIzVrk/s72-c/23.1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8492203843138229956</id><published>2009-12-19T01:28:00.001-08:00</published><updated>2009-12-19T01:30:58.072-08:00</updated><title type='text'>create a popup menu having cut, copy and paste options.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_7yyVsGPueko/Syyc5qYf3EI/AAAAAAAAAdw/7pds5KvNoQs/s1600-h/22.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 149px;" src="http://4.bp.blogspot.com/_7yyVsGPueko/Syyc5qYf3EI/AAAAAAAAAdw/7pds5KvNoQs/s320/22.jpg" alt="" id="BLOGGER_PHOTO_ID_5416876966263381058" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to create a popup menu having cut, copy and paste options. Apply these operations on the text in the text box.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;I&lt;span style="font-family: courier new; font-weight: bold;"&gt;f Button = 2 Then&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;PopupMenu mnufile&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub mnucopy_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Clipboard.Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Clipboard.SetText txt1.SelText&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub mnucut_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;clipboard.SetText txt1.SelText&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txt1.SelText = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub mnupaste_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txt1.SelText = Clipboard.GetText()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8492203843138229956?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8492203843138229956/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8492203843138229956' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8492203843138229956'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8492203843138229956'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/create-popup-menu-having-cut-copy-and.html' title='create a popup menu having cut, copy and paste options.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_7yyVsGPueko/Syyc5qYf3EI/AAAAAAAAAdw/7pds5KvNoQs/s72-c/22.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3654547572372125050</id><published>2009-12-19T01:22:00.000-08:00</published><updated>2009-12-19T01:28:07.235-08:00</updated><title type='text'>Create the following menus. Math-AddSubstract, Multiply, Divide, Exit (Give separator before Exit)Trig-Sin, Cos, Tan.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/Syybw-zkBrI/AAAAAAAAAdo/a-NEZriQxZA/s1600-h/21.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 174px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/Syybw-zkBrI/AAAAAAAAAdo/a-NEZriQxZA/s320/21.jpg" alt="" id="BLOGGER_PHOTO_ID_5416875717615158962" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Create the following menus. Math-AddSubstract, Multiply, Divide, Exit (Give separator before Exit)Trig-Sin, Cos, Tan.After users selects any of the menus corresponding program should work.&lt;br /&gt;Note: Use MDI form.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim n1,n2, result As Integer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim n3, n4, res1 As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdClick1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;nl = CInt(txtnum1.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;n2 = CInt (txtnum2.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If MDIForm1.opr = "A" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmCalculate.fraArith.Caption = "ADDITION"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;result = n1 + n2 txtResult1.Text = result&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If MDIForm1.opr = "S" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmCalculate.fraArith.Caption = "SUBTRACTION" result = n1 - n2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtResult1.Text = result&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If MDIForm1.opr = "M" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmCalculate.fraArith.Caption = "MULTIPLICATION"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;result = n1 * n2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtResult1. Text = result&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If MDIForm1.opr = "D" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmCalculate.fraArith.Caption = "DIVISION"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;result = n1/n2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;            txtResult1.Text = result&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command2_Click()&lt;br /&gt;Unload Me&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MDIForm1.Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdClick2_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;n4 = CDb1 (Text 4. Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;n3 = CDb1 (n4)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If MDIForm1. opr = "ST" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;A = (n3 * 180)/360&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;res1 = Sin (A)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtResult2.Text = res1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If &lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;   &lt;span style="font-family: courier new; font-weight: bold;"&gt;If MDIForm1.opr = "C" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmCalculate.fraTrig.Caption = "COS OF ANGLE"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;res1 = Cos (n3)&lt;br /&gt;txtResult2.Text = res1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;If MDIForm1.opr = "T" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmCalculate.fraTrig.Caption = "TAN OF ANGLE"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;res1 = Tan(n3)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtResult2.Text = res1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command4_Click()&lt;br /&gt;Unload Me&lt;br /&gt;MDIForm1.Show&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Form_Resize()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Frame1.Left = (Me.Width - Frame1.Width)/ 2 - 50&lt;br /&gt;Frame1.Top = (Me.Height - Frame1.Height)/ 2 - 230&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3654547572372125050?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3654547572372125050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3654547572372125050' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3654547572372125050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3654547572372125050'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/create-following-menus-math.html' title='Create the following menus. Math-AddSubstract, Multiply, Divide, Exit (Give separator before Exit)Trig-Sin, Cos, Tan.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7yyVsGPueko/Syybw-zkBrI/AAAAAAAAAdo/a-NEZriQxZA/s72-c/21.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7436261531234723055</id><published>2009-12-19T01:13:00.000-08:00</published><updated>2009-12-19T01:22:30.702-08:00</updated><title type='text'>basic with a back and tool having fields employee number, employee name, marital status as to single or double</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyZnHQuGaI/AAAAAAAAAdg/aMkOaG6V6Po/s1600-h/20.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 277px; height: 159px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyZnHQuGaI/AAAAAAAAAdg/aMkOaG6V6Po/s320/20.jpg" alt="" id="BLOGGER_PHOTO_ID_5416873349062990242" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in&lt;/span&gt;&lt;span style="font-family: verdana;"&gt; visual basic to connect visual basic with a back and tool&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;having fields employee number, employee name, marital status as to single or double (use option buttons). Give&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;the privileges to add, save, delete, modify and search the record. Give all the navigation facility to the user.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim con As New ADODB.Connection&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim rs As New ADODB.Recordset&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdClear_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'Call clear1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'cmdSave.Enabled = True&lt;br /&gt;'Text1.SetFocus&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = " "&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text2.Text = " "&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Option1. Value = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;0ption2.Value = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.SetFocus&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdDelete_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;a = MsgBox("Are you sure?", vbYesNo, "CONFORMATION ALERT")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If a = vbYes Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;con.Execute "delete from employee where empcode=" &amp;amp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox " Record deleted ...."&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If rs.State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Close&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Open "select * from employee", con, adOpenDynamic,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;adLockBatchOptimistic&lt;br /&gt;rs.MoveFirst&lt;br /&gt;Call show1&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdFisrt_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If rs.State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Close&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.0pen "select * from employee",con, adOpenDynamic,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;adLockBatchOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.MoveFirst&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Call show1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdLast_Click()&lt;br /&gt;If rs.State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If &lt;/span&gt;&lt;br /&gt;     &lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;rs.Open "select *from employee",con, adOpenDynamic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.MoveLast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Call show1&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdModify_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Option1.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;marstatus = "Single"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Option2.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;marstatus = "Double"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;con.Execute "update employee set empname=" &amp;amp; Text2.Text &amp;amp;                            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;" ', marstatus=' " &amp;amp; marstatus &amp;amp; " ' where empcode=" &amp;amp;                                                   " ' where empcode=" &amp;amp;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "Record Modified.....",vbOKOnly, "Update"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdNext_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If rs.State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Open "select * from employee", con,adOpenDynamic,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;adLockBatchOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.MoveNext&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If rs.EOF = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.MoveLast&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "End of File encountered",vbOKOnly,"eof "&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Call show1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdPrevious_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If rs. State = adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Open "select * from employee",con, adOpenDynamic,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;adLockBatchOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.MovePrevious&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If rs.BOF = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.MoveFirst&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "Begining Of File encounter..", vbOKOnly, "BOF"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Call show1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSave_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Option1. Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;marstatus = "Single"&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Option2. Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;marstatus = "Double" &lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;con.Execute "insert into employee values(" &amp;amp; Text1.Text &amp;amp; ", ' " &amp;amp; Text2. Text &amp;amp;" ', ' " &amp;amp; marstatus &amp;amp; " ')"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox " Record saved....",vbOKOnly, "Save"&lt;br /&gt;rs. Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Open&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'cmdSave. Enabled = False&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Command9_Click()&lt;br /&gt;Unload Me&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;con.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Source=D:\adodb\connection.mdb;Persist Security Info=False"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If rs.State= adStateOpen Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Close&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rs.Open "select * from employee", con, adOpenDynamic,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;adLockBatchOptimistic&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If (rs.EOF= False And rs.BOF = False) Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Call show1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'cmdSave. Enabled = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Form_Resize()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Frame1.Left = (Me.Width - Frame1.Width) / 2 - 50&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Frame1.Top = (Me. Height - Frame1.Height) / 2 - 230&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub show1()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = rs! empcode&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text2.Text = rs! empname&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Trim (rs! marstatus) = "Single" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Option1.Value = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'If rs!marstatus = "Single" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Option2. Value = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7436261531234723055?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7436261531234723055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7436261531234723055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7436261531234723055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7436261531234723055'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-with-back-and-tool-having-fields.html' title='basic with a back and tool having fields employee number, employee name, marital status as to single or double'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyZnHQuGaI/AAAAAAAAAdg/aMkOaG6V6Po/s72-c/20.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-580209559188292790</id><published>2009-12-19T01:08:00.000-08:00</published><updated>2009-12-19T01:13:36.748-08:00</updated><title type='text'>basic with a back end tool having fields roll number, name, address, marks, date of birth. Give the privileges to add,save,delete,modify and search</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/SyyYri_pe0I/AAAAAAAAAdY/mO8NYLJTEJs/s1600-h/19.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 306px; height: 320px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/SyyYri_pe0I/AAAAAAAAAdY/mO8NYLJTEJs/s320/19.jpg" alt="" id="BLOGGER_PHOTO_ID_5416872325715426114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic with a back end tool having fields roll number, name, address, marks, date of birth. Give the privileges to add, save, delete, modify and search the records. Give all the navigation facilities to the user. Note: Use data control &lt;/span&gt;&lt;br /&gt;&lt;/div&gt;  &lt;br /&gt;&lt;span style="font-family: verdana;"&gt; Ans&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdAdd_Click()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;add&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset. AddNew&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdFirst_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset .MoveFirst&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdLast_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset .MoveLast&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdNext_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset.MoveNext&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdPrevious_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset.MovePrevious&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSave_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;save&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset. Update&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdModify_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;modify&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset. Edit&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdDelete_Click()&lt;br /&gt;'delete&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Student. Recordset. Delete&lt;br /&gt;Student. Recordset. MoveFirst&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-580209559188292790?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/580209559188292790/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=580209559188292790' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/580209559188292790'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/580209559188292790'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-with-back-end-tool-having-fields.html' title='basic with a back end tool having fields roll number, name, address, marks, date of birth. Give the privileges to add,save,delete,modify and search'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7yyVsGPueko/SyyYri_pe0I/AAAAAAAAAdY/mO8NYLJTEJs/s72-c/19.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4836631051371808960</id><published>2009-12-19T01:04:00.001-08:00</published><updated>2009-12-19T01:08:09.525-08:00</updated><title type='text'>basic to Input an alphanumeric string and separate the characters and numbers.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyXhfATLiI/AAAAAAAAAdQ/heOPyS3bTu0/s1600-h/18.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 173px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyXhfATLiI/AAAAAAAAAdQ/heOPyS3bTu0/s320/18.jpg" alt="" id="BLOGGER_PHOTO_ID_5416871053334097442" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Input an alphanumeric string and separate the characters and numbers.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim str__len, I As Integer&lt;br /&gt;Dim str, dig As String&lt;br /&gt;Private Sub CmdSep_Click()&lt;br /&gt;str = txtString.Text&lt;br /&gt;str__len = Len(str)&lt;br /&gt;For I = 1 To str_len&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;st = Mid(str,I, 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Asc(st) &gt;= 65 Or Asc(st) &gt;= 112 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;alpha = alpha + st&lt;br /&gt;Elself Asc(st) &gt;= 48 Or Asc(st) &lt;= 57 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;dig = dig + st&lt;br /&gt;End If&lt;br /&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtAlpha. Text = alpha&lt;br /&gt;txtDigit.Text = dig&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4836631051371808960?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4836631051371808960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4836631051371808960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4836631051371808960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4836631051371808960'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-input-alphanumeric-string-and.html' title='basic to Input an alphanumeric string and separate the characters and numbers.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyXhfATLiI/AAAAAAAAAdQ/heOPyS3bTu0/s72-c/18.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-21025624857310047</id><published>2009-12-19T01:01:00.001-08:00</published><updated>2009-12-19T01:03:56.580-08:00</updated><title type='text'>basic to Perform multiplication of two matrices.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_7yyVsGPueko/SyyWnEztTUI/AAAAAAAAAdI/ArhG-UH8wpo/s1600-h/17.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 165px;" src="http://4.bp.blogspot.com/_7yyVsGPueko/SyyWnEztTUI/AAAAAAAAAdI/ArhG-UH8wpo/s320/17.jpg" alt="" id="BLOGGER_PHOTO_ID_5416870049869548866" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Perform multiplication of two matrices.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim m1(0 To 3) As Integer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim m2 (0 To 3) As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim m3 (0 To 3) As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim m4 (0 To 3) As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim m5 (0 To 3) As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim m6 (0 To 3) As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdEqual_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For i = 0 To 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;m1(i) = CInt(txtm1(i).Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;m2(i) = CInt (txtm2(i).Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For j = 0 To 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;m3(j) = m1(0) * m2(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtr1(j). Text = m3(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For j = 0 To 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;m4(j) = m1(1) * m2(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtr2(j) . Text = m4(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For j = 0 To 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;m5(j) = m1(2) * m2(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtr3(j).Text = m5(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For j = 0 To 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;m6(j) = m1(3) * m2(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtr4(j). Text = m6(j)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-21025624857310047?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/21025624857310047/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=21025624857310047' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/21025624857310047'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/21025624857310047'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-perform-multiplication-of-two.html' title='basic to Perform multiplication of two matrices.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_7yyVsGPueko/SyyWnEztTUI/AAAAAAAAAdI/ArhG-UH8wpo/s72-c/17.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8406413551559190633</id><published>2009-12-19T00:54:00.000-08:00</published><updated>2009-12-19T01:01:12.122-08:00</updated><title type='text'>basic to Search an element from characters and as well as from numbers using binary search method.</title><content type='html'>&lt;a style="font-family: verdana;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyVRSJTvwI/AAAAAAAAAdA/3FP0jrRlVJs/s1600-h/16.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 194px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyVRSJTvwI/AAAAAAAAAdA/3FP0jrRlVJs/s320/16.jpg" alt="" id="BLOGGER_PHOTO_ID_5416868575981059842" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;to Search an element from characters and as well as from numbers&lt;/span&gt; &lt;span style="font-family: verdana;"&gt;using binary search method.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim skey As Integer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim low, high, middle As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim found As Boolean&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Dim skey1 As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim low1, high1, middlel As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim found1 As Boolean&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdNumSearch_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Binary search for Numbers&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;low = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;high = 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;found = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;skey = CInt(txtSearch.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Do While found &lt;&gt; True And low &lt;= high&lt;br /&gt;middle = (high + low)                    /            2&lt;br /&gt;&lt;br /&gt;If txtArr (middle). Text &lt; skey Then&lt;br /&gt;low = middle + 1&lt;br /&gt;Elself txtArr(middle).Text &gt; skey Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;high = middle - 1&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;found = True&lt;br /&gt;End If&lt;br /&gt;Loop&lt;br /&gt;If found = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "Element found at:" + CStr(middle + 1)&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox " element not found"&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdCharSearch_LostFocus()&lt;br /&gt;For I = 0 To 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtArr (I).Text = Clear&lt;br /&gt;Next&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdCharSearch_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;low1 = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;high1 = 5&lt;br /&gt;found1 = False&lt;br /&gt;skey1 = txtSearch.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Do While found1 &lt;&gt; True And low1 &lt;= high1&lt;br /&gt;middle1 = (high1 + low1) / 2&lt;br /&gt;If txtArr (middle1).Text &lt; skey1 Then&lt;br /&gt;low1 = middle1 + 1&lt;br /&gt;Elself txtArr(middle1).Text &gt; skey1 Then&lt;br /&gt;high1 = middle1 - 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else    &lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: courier new; font-weight: bold;"&gt;found1 = True&lt;br /&gt;End If&lt;br /&gt;Loop&lt;br /&gt;If found1 = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "Element Found At :" + CStr(CInt(middle1 + 1))&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "Element Not Found"&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdNumSearch_LostFocus()&lt;br /&gt;For I = 0 To 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtArr(I).Text = Clear&lt;br /&gt;Next&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8406413551559190633?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8406413551559190633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8406413551559190633' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8406413551559190633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8406413551559190633'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-search-element-from-characters.html' title='basic to Search an element from characters and as well as from numbers using binary search method.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyVRSJTvwI/AAAAAAAAAdA/3FP0jrRlVJs/s72-c/16.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4725728747300991847</id><published>2009-12-19T00:51:00.000-08:00</published><updated>2009-12-19T00:54:23.905-08:00</updated><title type='text'>To Search A Character From An Array Using Sequential Search</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyUTPRaVTI/AAAAAAAAAc4/thNBXfIs238/s1600-h/15.2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 162px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyUTPRaVTI/AAAAAAAAAc4/thNBXfIs238/s320/15.2.jpg" alt="" id="BLOGGER_PHOTO_ID_5416867510057850162" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;To Search A Character From An Array Using Sequential Search&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim SKEY As String&lt;br /&gt;Dim FLAG As Boolean&lt;br /&gt;Private Sub cmdSearch_Click()&lt;br /&gt;SKEY = txtSearch. Text&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For I = 0 To 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If txtCArr(I).Text = SKEY Then&lt;br /&gt;FLAG = True&lt;br /&gt;Exit For&lt;br /&gt;End If&lt;br /&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;lblOutput1.Caption = Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If FLAG = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;lblOutput1.Caption = "The Element Is Found At " + CStr(I + 1) + " Position"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;lblOutput1. Caption = "ELEMENT NOT FOUND"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSearch_LostFocus()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For I = 0 To 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtCarr (I). Text = Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4725728747300991847?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4725728747300991847/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4725728747300991847' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4725728747300991847'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4725728747300991847'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/to-search-character-from-array-using.html' title='To Search A Character From An Array Using Sequential Search'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyUTPRaVTI/AAAAAAAAAc4/thNBXfIs238/s72-c/15.2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5744072665323905124</id><published>2009-12-19T00:47:00.000-08:00</published><updated>2009-12-19T00:51:29.066-08:00</updated><title type='text'>To Search A Number From An Array Using Sequential Search</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyTcs1mcRI/AAAAAAAAAcw/suSyPClnu_8/s1600-h/15.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 157px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyTcs1mcRI/AAAAAAAAAcw/suSyPClnu_8/s320/15.jpg" alt="" id="BLOGGER_PHOTO_ID_5416866573101461778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify; font-family: verdana;"&gt;To Search A Number From An Array Using Sequential Search&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim SKEY As String&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim FLAG As Boolean&lt;br /&gt;Private Sub cmdSearch_Click()&lt;br /&gt;SKEY = CInt(txtSearch.Text)&lt;br /&gt;FLAG = False&lt;br /&gt;For I = 0 To 5&lt;br /&gt;If txtNarr(I).Text = SKEY Then&lt;br /&gt;FLAG = True&lt;br /&gt;Exit For&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;If FLAG = True Then&lt;br /&gt;IblOutput1.Caption = "The Element Is Found At Position" CStr (I + 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;br /&gt;IblOutput1. Caption = "Element Is Not Found"&lt;br /&gt;End If&lt;br /&gt;End Sub&lt;br /&gt;Private Sub cmdSearch_LostFocus ()&lt;br /&gt;For I = 0 To 5&lt;br /&gt;txtNarr(I).Text = Clear&lt;br /&gt;Next&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5744072665323905124?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5744072665323905124/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5744072665323905124' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5744072665323905124'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5744072665323905124'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/to-search-number-from-array-using.html' title='To Search A Number From An Array Using Sequential Search'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyTcs1mcRI/AAAAAAAAAcw/suSyPClnu_8/s72-c/15.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7756589781480793832</id><published>2009-12-19T00:43:00.000-08:00</published><updated>2009-12-19T00:47:34.622-08:00</updated><title type='text'>To Sort Characters with The Help of Bubble Sort</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyySmOSsOLI/AAAAAAAAAco/AUToY7b3_0Q/s1600-h/14.2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 166px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyySmOSsOLI/AAAAAAAAAco/AUToY7b3_0Q/s320/14.2.jpg" alt="" id="BLOGGER_PHOTO_ID_5416865637189040306" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;To Sort Characters with The Help of Bubble Sort&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private sub cmdsort_LostFocus()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For I = 0 To 5&lt;br /&gt;txtCarr(I)Text = Clear&lt;br /&gt;Next&lt;br /&gt;End Sub&lt;br /&gt;Private Sub cmdSort_Click()&lt;br /&gt;Dim I, J As Integer&lt;br /&gt;Dim CArr (4) As String&lt;br /&gt;For I = 0 To 4&lt;br /&gt;CArr(I)= txtCarr(I).Text&lt;br /&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For I = 0 To 4&lt;br /&gt;For J = 4 To I + 1 Step -1&lt;br /&gt;If CArr (J) &lt; CArr(J - 1) Then&lt;br /&gt;X = CArr(J)&lt;br /&gt;CArr (J) = CArr(J - 1)&lt;br /&gt;CArr (J - 1) = X&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;Next&lt;br /&gt;For I = 0 To 4&lt;br /&gt;txtOutput(I).Text = CArr(I)&lt;br /&gt;Next&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7756589781480793832?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7756589781480793832/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7756589781480793832' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7756589781480793832'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7756589781480793832'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/to-sort-characters-with-help-of-bubble.html' title='To Sort Characters with The Help of Bubble Sort'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyySmOSsOLI/AAAAAAAAAco/AUToY7b3_0Q/s72-c/14.2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1642660490769760315</id><published>2009-12-19T00:40:00.000-08:00</published><updated>2009-12-19T00:43:56.684-08:00</updated><title type='text'>To sort Numbers with the help of Bubble Sort</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_7yyVsGPueko/SyyRySZ0ePI/AAAAAAAAAcg/YFWeqJ__BFg/s1600-h/14.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 178px;" src="http://4.bp.blogspot.com/_7yyVsGPueko/SyyRySZ0ePI/AAAAAAAAAcg/YFWeqJ__BFg/s320/14.jpg" alt="" id="BLOGGER_PHOTO_ID_5416864744939485426" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;To sort Numbers with the help of Bubble Sort&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSort_Click()&lt;br /&gt;Dim I,J,arr(5) As Integer&lt;br /&gt;For I = 0 To 4&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;arr(I) = CInt(txtarr(I))&lt;br /&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Logic To Sort&lt;br /&gt;J = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For I = 0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For J = 4 To I + 1 Step -1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If arr (J) &lt; arr (J - 1) Then&lt;br /&gt;X = arr(J)&lt;br /&gt;arr(J) = arr(J - 1)&lt;br /&gt;arr(J - 1) = X&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;Next&lt;br /&gt;For I = 0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtOutput(I).Text = CStr(arr(I))&lt;br /&gt;Next&lt;br /&gt;End Sub&lt;br /&gt;Private Sub cmdSort_LostFocus()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For I = 0 To 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtarr(I).Text = Clear&lt;br /&gt;Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1642660490769760315?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1642660490769760315/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1642660490769760315' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1642660490769760315'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1642660490769760315'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/to-sort-numbers-with-help-of-bubble.html' title='To sort Numbers with the help of Bubble Sort'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_7yyVsGPueko/SyyRySZ0ePI/AAAAAAAAAcg/YFWeqJ__BFg/s72-c/14.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5166359710110598542</id><published>2009-12-19T00:37:00.000-08:00</published><updated>2009-12-19T00:40:38.815-08:00</updated><title type='text'>To Sort Numbers Using Linear Sort</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyQ-pyy95I/AAAAAAAAAcY/YyIrmZu-iK4/s1600-h/13.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 175px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyQ-pyy95I/AAAAAAAAAcY/YyIrmZu-iK4/s320/13.jpg" alt="" id="BLOGGER_PHOTO_ID_5416863857865062290" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;To Sort Numbers Using Linear Sort&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSort_Click ()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim I, J, K, arr(4) As Integer&lt;br /&gt;For I = 0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;arr(I) = CInt(txtarr(I).Text)&lt;br /&gt;Next&lt;br /&gt;For I = 0 To 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For J = I To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If arr(I) &lt; arr(J) Then&lt;br /&gt;X = arr(I)&lt;br /&gt;arr(I) = arr(J)&lt;br /&gt;arr(J) = X&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;Next&lt;br /&gt;For I = 0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtoutput (I) .Text = CStr (arr (I))&lt;br /&gt;Next&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSort__LostFocus()&lt;br /&gt;For I = 0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtarr(I).Text = Clear&lt;br /&gt;Next&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5166359710110598542?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5166359710110598542/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5166359710110598542' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5166359710110598542'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5166359710110598542'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/to-sort-numbers-using-linear-sort.html' title='To Sort Numbers Using Linear Sort'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyQ-pyy95I/AAAAAAAAAcY/YyIrmZu-iK4/s72-c/13.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7150569448749634230</id><published>2009-12-19T00:29:00.000-08:00</published><updated>2009-12-19T00:37:19.811-08:00</updated><title type='text'>To Sort Characters Using Linear Sort</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyPJy1TpkI/AAAAAAAAAcQ/EcTYijRJw9Y/s1600-h/13.1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 190px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyPJy1TpkI/AAAAAAAAAcQ/EcTYijRJw9Y/s320/13.1.jpg" alt="" id="BLOGGER_PHOTO_ID_5416861850246817346" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;To Sort Characters Using Linear Sort&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSort_Click()&lt;br /&gt;0 To 3&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim I, J, K As Integer&lt;br /&gt;Dim arr(4) As String&lt;br /&gt;For I = 0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;arr(I) = txtarr(I).Text&lt;br /&gt;Next&lt;br /&gt;For I = For J = I To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If CStr(arr(I)) &lt; CStr(arr(J)) Then&lt;br /&gt;X = arr(I)&lt;br /&gt;arr(I) = arr(J)&lt;br /&gt;arr(J) = X&lt;br /&gt;End If&lt;br /&gt;Next&lt;br /&gt;Next&lt;br /&gt;For I = 0 To 4&lt;br /&gt;&lt;/span&gt;&lt;arr(j)) style="font-family: verdana;" then="" x="arr(I)" end="" if="" next="" for="" i="0" to="" 4=""&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtOutput(I).Text = arr(I)&lt;br /&gt;Next&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdSort_LostFocus ()&lt;br /&gt;For I = 0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtarr(I).Text = Clear&lt;br /&gt;Next&lt;br /&gt;End Sub &lt;/span&gt;&lt;br /&gt;&lt;/arr(j))&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7150569448749634230?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7150569448749634230/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7150569448749634230' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7150569448749634230'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7150569448749634230'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/to-sort-characters-using-linear-sort.html' title='To Sort Characters Using Linear Sort'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyPJy1TpkI/AAAAAAAAAcQ/EcTYijRJw9Y/s72-c/13.1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8897383432228531359</id><published>2009-12-19T00:19:00.000-08:00</published><updated>2009-12-19T00:29:06.997-08:00</updated><title type='text'>basic to Conduct an online competitive exam.</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyNE3-ZsgI/AAAAAAAAAcI/WHFiIiMJoag/s1600-h/12.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 251px; height: 320px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyNE3-ZsgI/AAAAAAAAAcI/WHFiIiMJoag/s320/12.jpg" alt="" id="BLOGGER_PHOTO_ID_5416859566704538114" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Conduct an online competitive exam. The exam should contain any five questions. User will be given four choices as an answer. Give 10 marks for every correct answer and 0 for every wrong answer. Display summery of result at the end.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Q1 form&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Public marks As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Public f1, f2, f3, f4, f5 As Boolean&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdNext_Click()&lt;br /&gt;If opt Float.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;marks = merks + 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;f1 = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else                    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;marks = marks + 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;f1 = False             &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ2 .Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Q2 Form&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Command1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If optDev.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQl.marks = frmQl.marks + 10&lt;br /&gt;frmQl.f2 = True&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQl.marks = frmQl.marks + 0&lt;br /&gt;frmQl.f2 = False&lt;br /&gt;End If&lt;br /&gt;frmQ3.Show&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Q3 Form&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdNext_Click()&lt;br /&gt;If optFoxPro. Value = True Then&lt;br /&gt;frmQ1. marks = frmQl.marks + 10&lt;br /&gt;frmQl.f3 = True&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ1. marks = frmQl.marks + 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ1.f3 = False&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ4.Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Q4 Form&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdNext_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If optVbgreen. Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ1.marks = frmQ1.marks + 10 &lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ1.f4 = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ1. marks = frmQl. marks + 0&lt;br /&gt;frmQ1.f4 = False&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ5.Show&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Q5 Form&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdNext_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If opt False. Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ1.marks = frmQ1.marks + 10&lt;br /&gt;frmQ1.f5 = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmQ1. marks = frmQ1.marks + 0&lt;br /&gt;frmQ1.f5 = False&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;frmResult.Show&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Result Form&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdTotal_Click().&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If frmQ1. f1 = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ1.Text = "Correct"&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ1.Text = "Wrong"&lt;br /&gt;End If&lt;br /&gt;If frmQl.f2 = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ2.Text = "Correct"&lt;br /&gt;Else                    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ2.Text = "Wrong"&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If frmQl.f3 = True Then&lt;br /&gt;txtQ3.Text = "Correct"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ3.Text = "Wrong"&lt;br /&gt;End If&lt;br /&gt;If frmQl.f4 = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ4.Text = "Correct"&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ4.Text = "Wrong"&lt;br /&gt;End If&lt;br /&gt;If frmQl.f5 = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ5.Text = "Correct"&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtQ5.text = "Wrong"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtMarkS.Text = frmQl.marks&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdExit_Click() &lt;/span&gt;&lt;br /&gt;  &lt;span style="font-family: courier new; font-weight: bold;"&gt;End&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8897383432228531359?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8897383432228531359/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8897383432228531359' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8897383432228531359'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8897383432228531359'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-conduct-online-competitive.html' title='basic to Conduct an online competitive exam.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyNE3-ZsgI/AAAAAAAAAcI/WHFiIiMJoag/s72-c/12.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2283162764042348918</id><published>2009-12-19T00:01:00.001-08:00</published><updated>2009-12-19T00:19:05.363-08:00</updated><title type='text'>basic to input consumer number, consumer name,area urban,ruraly,month of billing,last reading,current reading andcalculate thebill amount</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_7yyVsGPueko/SyyI5_xi83I/AAAAAAAAAcA/UIPpZK2DBOU/s1600-h/11.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 290px; height: 291px;" src="http://4.bp.blogspot.com/_7yyVsGPueko/SyyI5_xi83I/AAAAAAAAAcA/UIPpZK2DBOU/s320/11.jpg" alt="" id="BLOGGER_PHOTO_ID_5416854981773030258" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and programin visual basic to input consumer number, consumer name, area (urban,ruraly, month of billing, last reading, current reading and calculate the bill amount according to the following conditions.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;Household:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1 to 30                      - 1.00Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;31 to 100 - 2.55Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;101 to 300 - 2.95Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;301 onwards - 4.55Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Industrial:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1 to 1000                 -       2.40Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1001 to 1500           - 3.00Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1501 onwards           - 3.40Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Non Household:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;1 to 100                   -       2.56RS.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;101 to 200               -       4.10Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;201 onwards             -     5.00Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Urban water supply              - 2.25 Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Rural, water supply     -       1.40 Rs .&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Agriculture                    -         0.90Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Rural Lighting             -          1.70Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Urban Lighting             -         2.50Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Poultry Farm                 -         0.90Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Total Reading = Current   Reading - Last Reading&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim c, r1, a, b, p As Integer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub Form_Load()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions.Addltem "HOUSEHOLD", 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions. Addltem "NONHOUSEHOLD",1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions.Addltem " IDNUSTRIAL", 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions.Addltem "URBAN WTAER SUPPLY", 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions. Addltem "RURAL WATER SUPPLY", 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions.Addltem "AGRICULTURE", 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions.Addltem "RURAL LIGHTING", 6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions.Addltem "URBAN LIGHTING", 7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;cboOptions.Addltem "POULTRY FARM", 8&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub cmdCalculate_Click ()&lt;br /&gt;p2 = 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;t1 = cboOptions.Text&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;c = Clnt(txtCMR.Text) - CInt (txtLMR. Text)&lt;br /&gt;If t1 = "HOUSEHOLD" Then for Household purpose&lt;br /&gt;If c &gt; 300 Then&lt;br /&gt;r1 = c - 300&lt;br /&gt;p = rl * 4.55&lt;br /&gt;p2 = p + 798.5&lt;br /&gt;&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;  &lt;span style="font-family: courier new; font-weight: bold;"&gt;If c &gt; 100 And c &lt;= 300 Then&lt;br /&gt;r1 = c - 100&lt;br /&gt;p = r1 * 2.95&lt;br /&gt;p2 = p + 208.5&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;If c &gt; 30 And c &lt;= 100 Then&lt;br /&gt;r1 = c - 30&lt;br /&gt;p = r1 * 2.55&lt;br /&gt;p2 = p + 30&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;If c &lt;= 30 Then&lt;br /&gt;r1 = c - 0&lt;br /&gt;p = r1 * 1&lt;br /&gt;p2 = p&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;Elself t1 = "NONHOUSEHOLD" Then for non household&lt;br /&gt;If c &gt; 200 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;r1 = c - 200&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p= r1 * 5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = p + 660&lt;br /&gt;End If&lt;br /&gt;If c &gt; 100 And c &lt;= 200 Then&lt;br /&gt;r1 = c - 100&lt;br /&gt;p = r1 * 4.1&lt;br /&gt;p2 = p + 250&lt;br /&gt;End If&lt;br /&gt;If c &lt;= 100 Then&lt;br /&gt;r1 = c - 0&lt;br /&gt;p = r1 * 2.5&lt;br /&gt;p2 = p&lt;br /&gt;End If&lt;br /&gt;Elself t1 = "IDNUSTRIAL" Then for Industrial&lt;br /&gt;If c &gt; 15000 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;r1 = c - 15000&lt;br /&gt;p = r1 * 3.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = p + 44400&lt;br /&gt;End If&lt;br /&gt;If c &gt; 1000 And c &lt;= 15000 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;r1 = c - 1000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p = r1 * 3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = p + 2400&lt;br /&gt;End If&lt;br /&gt;If c &lt;= 1000 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;r1 = c - 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p = r1 * 2.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = p&lt;br /&gt;End If&lt;br /&gt;Elself t1 = "URBAN WTABR SUPPLY" Then&lt;br /&gt;p2 = c * 2.25&lt;br /&gt;Elself t1 = "RURAL WATER SUPPLY" Then&lt;br /&gt;p2 = c * 1.4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Elself t1 = "AGRICULTURE" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = c * 0.9&lt;br /&gt;Elself t1 = "RURAL LIGHTING" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = c * 1.7&lt;br /&gt;Elself t1 = "URBAN LIGHTING" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = c * 2.5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;p2 = c * 0.9&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtTAmt.Text = CStr(p2)&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdClear_Click()&lt;br /&gt;txtName.Text = Clear&lt;br /&gt;txtNumber.Text = Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtMOB.Text = Clear&lt;br /&gt;txtLMR.Text = Clear&lt;br /&gt;txtCMR.Text = Clear&lt;br /&gt;cboOptions. Text = Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdExit_Click()&lt;br /&gt;Unload Me&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2283162764042348918?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2283162764042348918/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2283162764042348918' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2283162764042348918'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2283162764042348918'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-input-consumer-number-consumer.html' title='basic to input consumer number, consumer name,area urban,ruraly,month of billing,last reading,current reading andcalculate thebill amount'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_7yyVsGPueko/SyyI5_xi83I/AAAAAAAAAcA/UIPpZK2DBOU/s72-c/11.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8119107041597320279</id><published>2009-12-18T23:58:00.000-08:00</published><updated>2009-12-19T00:01:41.382-08:00</updated><title type='text'>basic to Input telephone number, consumer name, address, area (rural urban),Number of calls.</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyH6AO2A5I/AAAAAAAAAb4/b0VbI4GMcdQ/s1600-h/10.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 270px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyH6AO2A5I/AAAAAAAAAb4/b0VbI4GMcdQ/s320/10.jpg" alt="" id="BLOGGER_PHOTO_ID_5416853882384286610" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Input telephone number, consumer name, address, area (rural urban),Number of calls. Calculate the telephone bill by using following conditions: Urban&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;a) Rental 250&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;b) Free calls 150&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;c) 151 to 400 calls - 0.80 Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;d) 401 to 1000 calls - 1 Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;e) 1001 onwards                         - 1.20Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Rural&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;a) Rental 180&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;b) Free calls 250&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;c) 251 to 450 calls - 0.60 Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;d) 451 to 500 calls - 0.80RS.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;e) 501 to 1000                                  - lRs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;f) 1001 onwards                         - 1.20 Rs.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim Ncall As Integer Private Sub Form Load ()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;optRural.Enabled = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;optUrban.Enabled = False&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Private Sub optRural_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Ncall = CInt(txtCalls.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Ncall &lt;= 180 Then s = 180 Elself Ncall &gt;= 251 And Ncall &lt;= 450 Then s = Ncall * 0.6 * 180 Elself Ncall &gt;= 451 And Ncall &lt;= 500 Then s = Ncall * 0.8 * 180 Elself Ncall &gt; 501 And Ncall &lt;= 1000 Then s = Ncall * 1 * 180 Elself Ncall &gt; 1000 Then s = Ncall * 1.2 * 180&lt;br /&gt;&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtFcall.Text = 250 txtTamt.Text = s&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub optUrban_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Ncall = 0 &lt;/span&gt;&lt;br /&gt;     &lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; If Ncall &lt;=150 Then s = 250 Elself Ncall &gt;= 151 And Ncall &lt;= 400 Then s = Ncall * 0.8 * 250 Elself Ncall &gt;= 401 And Ncall &lt;= 1000 Then s = Ncall * 1 * 250 Elself Ncall &gt; 1000 Then S = Ncall * 1.2 * 250&lt;br /&gt;&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtFcall.Text = 150 txtTamt. Text = s&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub txtCalls_LostFocus() optRural. Enabled = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;optUrban.Enabled = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End Sub                                                                                   &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8119107041597320279?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8119107041597320279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8119107041597320279' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8119107041597320279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8119107041597320279'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-input-telephone-number.html' title='basic to Input telephone number, consumer name, address, area (rural urban),Number of calls.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyH6AO2A5I/AAAAAAAAAb4/b0VbI4GMcdQ/s72-c/10.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-6677290176651315701</id><published>2009-12-18T23:54:00.000-08:00</published><updated>2009-12-18T23:58:30.124-08:00</updated><title type='text'>basic to Arrange the given pairs of options and allow the user to match the pairs.</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyHHvHScUI/AAAAAAAAAbw/YRE6EIcCLq0/s1600-h/9.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 208px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyHHvHScUI/AAAAAAAAAbw/YRE6EIcCLq0/s320/9.jpg" alt="" id="BLOGGER_PHOTO_ID_5416853018795733314" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Arrange the given pairs of options and allow the user to match the pairs. If user has selected the correct option then the result should be given by displaying green color, red color otherwise. Correct pairs are given below:&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;Sachin Tendulkar : Cricket V.Anand                   : Chess&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Leander Pace             : Tennis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Mike Tyson               : Boxing                                                                                   -&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Note: Use option buttons.&lt;br /&gt;&lt;br /&gt;Ans :&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub optChess_Click()&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If optAnand.Value = True Then txtcolor.BackColor = vbGreen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtcolor.BackColor = vbRed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;Private Sub optTennis_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If optPace. Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtcolor.BackColor = vbGreen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtcolor.BackColor = vbRed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub optCricket_Click ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If optSachin.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtcolor.BackColor = &lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; vbGreen                       &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;Else                     &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtcolor.BackColor = vbRed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub optBoxing_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If optTyson.Value = True Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtcolor.BackColor = vbGreen&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtcolor.BackColor = vbRed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End If&lt;br /&gt;End Sub  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-6677290176651315701?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/6677290176651315701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=6677290176651315701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6677290176651315701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6677290176651315701'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-arrange-given-pairs-of-options.html' title='basic to Arrange the given pairs of options and allow the user to match the pairs.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyHHvHScUI/AAAAAAAAAbw/YRE6EIcCLq0/s72-c/9.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5280090005506516439</id><published>2009-12-18T23:48:00.000-08:00</published><updated>2009-12-18T23:53:55.649-08:00</updated><title type='text'>basic to Enter a date of birth from the user and calculate his age in days, months and years as on current date.</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://3.bp.blogspot.com/_7yyVsGPueko/SyyGBDnMDwI/AAAAAAAAAbo/k7SSWvcoW1A/s1600-h/8.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 150px;" src="http://3.bp.blogspot.com/_7yyVsGPueko/SyyGBDnMDwI/AAAAAAAAAbo/k7SSWvcoW1A/s320/8.jpg" alt="" id="BLOGGER_PHOTO_ID_5416851804527529730" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Enter a date of birth from the user and calculate his age in days, months and years as on current date. Current date should be taken from the system.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Note: Use DTpicker control.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim dob, curdate As Date&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim d1, m1, y2, d2, m2, y1, d3, m3, y3 As Integer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdAge_Click ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;dob = CDate(txtDob. Text) curdate = CDate(txtCDate.Text) d1 = Day(dob) m1 = Month (dob) y1 = Year (dob) d2 = Day(curdate)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;y2 = Year(curdate)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If d1 &gt; d2 Then d2 = d2 + 30 m2 = m2 - 1 End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If m1 &gt; m2 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;m2 = m2 + 12 y2 = y2 - 1&lt;br /&gt;&lt;br /&gt;End If                    &lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; m3 = m2 - m1 Y3 = Y2 - Y1 d3 = d2 - d1 txtDay. Text = d3 txtMonth.Text = m3 txtYear. Text = y3 End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub txtCDate_GotFocus ()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtCDate. Text = Date&lt;br /&gt;&lt;br /&gt;End Sub  &lt;/span&gt;&lt;br /&gt;  &lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt; Private Sub txtDob_Vali date (Cancel As Boolean)&lt;br /&gt;If IsDate(txtDob.Text) = False Then MsgBox "Enter The Valid date" txtDob. Text = Clear txtDob.SetFocus&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5280090005506516439?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5280090005506516439/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5280090005506516439' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5280090005506516439'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5280090005506516439'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-enter-date-of-birth-from-user.html' title='basic to Enter a date of birth from the user and calculate his age in days, months and years as on current date.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/_7yyVsGPueko/SyyGBDnMDwI/AAAAAAAAAbo/k7SSWvcoW1A/s72-c/8.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3480211285828359812</id><published>2009-12-18T23:45:00.000-08:00</published><updated>2009-12-18T23:48:07.486-08:00</updated><title type='text'>basic to Generate a stopwatch for 10 minutes. Note: Use timer control.</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/SyyE35gAcdI/AAAAAAAAAbg/ZGs1wSoNRT8/s1600-h/7.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 110px; height: 78px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/SyyE35gAcdI/AAAAAAAAAbg/ZGs1wSoNRT8/s320/7.jpg" alt="" id="BLOGGER_PHOTO_ID_5416850547682603474" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Generate a stopwatch for 10 minutes. Note: Use timer control.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim sec, min As Integer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Timer1_Timer () sec = sec + 1 If sec = 60 Then sec = 0 min = min + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If min = 10 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;MsgBox "10 minutes over" Timer1.Enabled = False&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End If&lt;br /&gt;&lt;br /&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3480211285828359812?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3480211285828359812/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3480211285828359812' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3480211285828359812'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3480211285828359812'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-generate-stopwatch-for-10.html' title='basic to Generate a stopwatch for 10 minutes. Note: Use timer control.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7yyVsGPueko/SyyE35gAcdI/AAAAAAAAAbg/ZGs1wSoNRT8/s72-c/7.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7629673356474037038</id><published>2009-12-18T23:41:00.000-08:00</published><updated>2009-12-18T23:45:45.463-08:00</updated><title type='text'>basic to enter a decimal number from the user and convert it into equivalent binary number.</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyD3X8p2HI/AAAAAAAAAbY/lmfYfpLlpLM/s1600-h/6.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 119px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyD3X8p2HI/AAAAAAAAAbY/lmfYfpLlpLM/s320/6.jpg" alt="" id="BLOGGER_PHOTO_ID_5416849439164323954" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write and algorithm and program in visual basic to enter a decimal number from the user and convert it into equivalent binary number.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;From should be designed in such a way that all the controls should be located centrally in every size of the form.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim t As Integer&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim d, num, sum As Single&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdClear_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtBinary. Text = Clear txtValue .Text = Clear&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;'Logic To Convert Decimal To Binary Private Sub cmdConvert_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;t = 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;sum =0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;num = CInt(txtValue.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;n = num&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;While Not num = 0 d = num Mod 2 sum = sum + (d * t)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;t = t * 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;num = num \ 2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Wend&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtBinary.Text = CStr(sum)                                                          &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7629673356474037038?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7629673356474037038/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7629673356474037038' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7629673356474037038'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7629673356474037038'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-enter-decimal-number-from-user.html' title='basic to enter a decimal number from the user and convert it into equivalent binary number.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyD3X8p2HI/AAAAAAAAAbY/lmfYfpLlpLM/s72-c/6.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-722691461366340728</id><published>2009-12-18T23:39:00.001-08:00</published><updated>2009-12-18T23:41:17.984-08:00</updated><title type='text'>basic to Input at least four digit number from the user and print the addition of all the digit of given number.</title><content type='html'>&lt;div style="text-align: center; font-family: verdana;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_7yyVsGPueko/SyyDTXdkOAI/AAAAAAAAAbQ/_6nymX-iAgU/s1600-h/5.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 172px;" src="http://4.bp.blogspot.com/_7yyVsGPueko/SyyDTXdkOAI/AAAAAAAAAbQ/_6nymX-iAgU/s320/5.jpg" alt="" id="BLOGGER_PHOTO_ID_5416848820558641154" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to Input at least four digit number from the user and print the addition of all the digit of given number.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;From should be designed in such a way that all the controls should be located centrally in every size of the form.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;Ans:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim r, I, num, sum As Integer Dim rev As String&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdReverse_Click() sum = 0 num = CInt(txtnumber.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;For I =0 To 4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;r = num Mod 10 num = num / 10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;rev = rev + Str(r)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;sum = sum + r&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Next txtReverse.Text = rev&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;txtSum.Text = sum&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-722691461366340728?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/722691461366340728/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=722691461366340728' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/722691461366340728'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/722691461366340728'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-input-at-least-four-digit.html' title='basic to Input at least four digit number from the user and print the addition of all the digit of given number.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_7yyVsGPueko/SyyDTXdkOAI/AAAAAAAAAbQ/_6nymX-iAgU/s72-c/5.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5022727693706684594</id><published>2009-12-18T23:34:00.000-08:00</published><updated>2009-12-18T23:38:55.233-08:00</updated><title type='text'>basic to generate a thermometer. The thermometer should be displayed vertically in vertical scroll bar.</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyCwEY-FhI/AAAAAAAAAbI/CV9SWDWVn00/s1600-h/4.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 184px; height: 184px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyCwEY-FhI/AAAAAAAAAbI/CV9SWDWVn00/s320/4.jpg" alt="" id="BLOGGER_PHOTO_ID_5416848214143669778" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to generate a thermometer. The thermometer should be displayed vertically in vertical scroll bar. Initially Celsius label should display 0 and Fahrenheit 32.If the user scroll the scroll bar upward then the temperature should be displayed in Celsius and Fahrenheit in the corresponding labels increased by 1. Celsius= (Fahrenheit-32)*5/9&lt;/span&gt; &lt;/div&gt;&lt;span style="font-family:verdana;"&gt;&lt;br /&gt;Ans :&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Dim tempf, tempc As Integer&lt;/span&gt;&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub cmdClear_Click()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;Logic for clearing text boxes IblFah. Caption = Clear  &lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;   &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;IblCel.Caption = Clear&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub cmdExit_click()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;unload Me&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub Form__Load()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;VscTemp.Value = 32&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;IblFah.Caption = VscTemp.Value&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;IblCel.Caption = 0&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub VscTemp_Change()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;tempf = CInt(VscTemp.Value) IblFah.Caption = CStr(tempf) tempc = ((tempf - 32) * 5 / 9) IblCel .Caption = CStr (tempc)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;End Sub   &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5022727693706684594?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5022727693706684594/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5022727693706684594' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5022727693706684594'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5022727693706684594'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-generate-thermometer.html' title='basic to generate a thermometer. The thermometer should be displayed vertically in vertical scroll bar.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyCwEY-FhI/AAAAAAAAAbI/CV9SWDWVn00/s72-c/4.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-838735759629905069</id><published>2009-12-18T23:30:00.000-08:00</published><updated>2009-12-18T23:34:34.216-08:00</updated><title type='text'>basic to input the employee number, employee name,designation,basic salary and grade from the user and calculate the bonus according to the following.</title><content type='html'>&lt;div style="text-align: center;"&gt;&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyB26GzoQI/AAAAAAAAAbA/QP6GwUI_Ue0/s1600-h/3.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 296px; height: 240px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyB26GzoQI/AAAAAAAAAbA/QP6GwUI_Ue0/s320/3.jpg" alt="" id="BLOGGER_PHOTO_ID_5416847232130588930" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to input the employee number, employee name,designation,basic salary and grade from the user and calculate the bonus according to the following.&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;If grade is B then bonus will be 7000&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;From should be designed in such a way that all the controls should be located centrally in every size of the form.&lt;/span&gt; &lt;/div&gt;&lt;span style="font-family:verdana;"&gt;Ans :&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;&lt;br /&gt;Dim bon, sal As Integer&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub cmdCalculate_Click()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;Logic for calculating the salary/bonus  &lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;   &lt;/span&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;If optA.Value = True Then&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;bon = 1000&lt;br /&gt;&lt;br /&gt;Elself optB.Value = True Then&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;bon = 7000&lt;br /&gt;&lt;br /&gt;Else&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;bon = 12000&lt;br /&gt;&lt;br /&gt;End If&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtBonus. Text = CStr (bon) txtSal.Text = CStr(sal + bon)&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;End Sub   &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-838735759629905069?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/838735759629905069/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=838735759629905069' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/838735759629905069'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/838735759629905069'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-input-employee-number-employee.html' title='basic to input the employee number, employee name,designation,basic salary and grade from the user and calculate the bonus according to the following.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyB26GzoQI/AAAAAAAAAbA/QP6GwUI_Ue0/s72-c/3.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-6291231115037608629</id><published>2009-12-18T23:00:00.000-08:00</published><updated>2009-12-18T23:30:47.500-08:00</updated><title type='text'>basic to input the units in foot and convert it into meter, inches, centimeters and millimeters.</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://1.bp.blogspot.com/_7yyVsGPueko/SyyAwpxosnI/AAAAAAAAAa4/BcF8RWTzoVA/s1600-h/2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 316px; height: 159px;" src="http://1.bp.blogspot.com/_7yyVsGPueko/SyyAwpxosnI/AAAAAAAAAa4/BcF8RWTzoVA/s320/2.jpg" alt="" id="BLOGGER_PHOTO_ID_5416846025155981938" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;Draw flowchart, write an algorithm and program in visual basic to input the units in foot and convert it into meter, inches, centimeters and millimeters.&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;Form should be designed in such a way that all the controls should be located centrally is every size of the form. Meter=foot*0.305 Inch=foot*12 Centimeter=foot*30.48 Millimeter=foot*304.8 From should be designed in such a way that all the controls should be located centrally in every size of the form.&lt;/span&gt;&lt;br /&gt;&lt;/div&gt;&lt;span style="font-family:verdana;"&gt;Ans:&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;&lt;br /&gt;&lt;br /&gt;Dim f As Single&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;Logic for Calculation Part Private Sub cmdCalculate_Click()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;f = CSng(txtFoot.Text)&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtMtr.Text = CStr(f * 0.305)&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtlnch.Text = CStr(f * 12)&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtCenti.Text = CStr(f * 30.48)&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtMilli.Text = CStr(f * 304.8)&lt;br /&gt;&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;'Logic To Clear the text boxes Private Sub cmdClear_Click()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtFoot.Text = Clear&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtlnch.Text = Clear&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtMilli.Text = Clear&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtMtr.Text = Clear&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtCenti.Text = Clear&lt;br /&gt;&lt;br /&gt;End Sub  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-6291231115037608629?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/6291231115037608629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=6291231115037608629' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6291231115037608629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6291231115037608629'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-input-units-in-foot-and.html' title='basic to input the units in foot and convert it into meter, inches, centimeters and millimeters.'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/_7yyVsGPueko/SyyAwpxosnI/AAAAAAAAAa4/BcF8RWTzoVA/s72-c/2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-540888590441874997</id><published>2009-12-18T22:57:00.000-08:00</published><updated>2009-12-18T23:00:48.943-08:00</updated><title type='text'>basic to input the ASCII values from the user and decide whether the given character is a capital letter, small letter, numeric value or specialsymbol</title><content type='html'>&lt;a onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://4.bp.blogspot.com/_7yyVsGPueko/Syx6EMmR9HI/AAAAAAAAAaw/723R78xx47k/s1600-h/1.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 175px;" src="http://4.bp.blogspot.com/_7yyVsGPueko/Syx6EMmR9HI/AAAAAAAAAaw/723R78xx47k/s320/1.jpg" alt="" id="BLOGGER_PHOTO_ID_5416838664339715186" border="0" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-family:verdana;"&gt;Draw flowchart, write an algorithm and program in visual&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;basic to input the ASCII values from the user and decide whether the given character is a capital letter, small letter, numeric value or special symbol.&lt;/span&gt; &lt;span style="font-family:verdana;"&gt;From should be designed in such a way that all the controls should be located centrally in every size of the form.&lt;/span&gt; &lt;/div&gt;   &lt;span style="font-family:verdana;"&gt;Ans:      &lt;br /&gt;    &lt;span style="font-weight: bold;font-family:courier new;" &gt;         &lt;/span&gt;&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;Private Sub cmdClear_Click()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtOutput.Text = Clear&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtString.Text = Clear&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtString.SetFocus&lt;br /&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;font-family:courier new;" &gt;'Logic To Verify Through Ascii Values&lt;br /&gt;&lt;br /&gt;Private Sub cmdVerify_Click ()&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;If (Asc (txtString.Text) &gt;= 48 And Asc (txtString.Text) &lt;= 57) Then&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtOutput.Text = " Digit" Elself (Asc(txtString.Text) &gt;= 65 And Asc(txtString.Text) &lt;= 90) Then&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtOutput.Text = "Capital Letter" Elself (Asc(txtString.Text) &gt;= 97 And Asc(txtString.Text) &lt;= 122) Then&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtOutput.Text = "Small Letter" Else&lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;txtOutput. Text = "Special Symbol"&lt;br /&gt;End If                &lt;/span&gt; &lt;span style="font-weight: bold;font-family:courier new;" &gt;End Sub  &lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-540888590441874997?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/540888590441874997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=540888590441874997' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/540888590441874997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/540888590441874997'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/12/basic-to-input-ascii-values-from-user.html' title='basic to input the ASCII values from the user and decide whether the given character is a capital letter, small letter, numeric value or specialsymbol'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/_7yyVsGPueko/Syx6EMmR9HI/AAAAAAAAAaw/723R78xx47k/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5079385418014998547</id><published>2009-10-12T08:01:00.000-07:00</published><updated>2009-10-12T08:07:06.282-07:00</updated><title type='text'>Creating Runtime Data Reports</title><content type='html'>&lt;a style="font-family: courier new; font-weight: bold;" onblur="try {parent.deselectBloggerImageGracefully();} catch(e) {}" href="http://2.bp.blogspot.com/_7yyVsGPueko/StNFOIqEJII/AAAAAAAAAWU/w6-gaCmVBuQ/s1600-h/vb2.jpg"&gt;&lt;img style="margin: 0px auto 10px; display: block; text-align: center; cursor: pointer; width: 320px; height: 236px;" src="http://2.bp.blogspot.com/_7yyVsGPueko/StNFOIqEJII/AAAAAAAAAWU/w6-gaCmVBuQ/s320/vb2.jpg" alt="" id="BLOGGER_PHOTO_ID_5391729288037016706" border="0" /&gt;&lt;/a&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub Combo1_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If Combo1.Text = "OBC" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport1.Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;ElseIf Combo1.Text = "SC" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport2.Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;DataReport3.Show&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5079385418014998547?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5079385418014998547/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5079385418014998547' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5079385418014998547'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5079385418014998547'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/10/creating-runtime-data-reports.html' title='Creating Runtime Data Reports'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/_7yyVsGPueko/StNFOIqEJII/AAAAAAAAAWU/w6-gaCmVBuQ/s72-c/vb2.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8494194541843898295</id><published>2009-10-12T07:11:00.000-07:00</published><updated>2009-10-12T07:16:00.099-07:00</updated><title type='text'>User Control ,Creating OCX File in VB, Adding OCX to Components .</title><content type='html'>&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim a, b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Dim sy&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdequal_Click()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;b = Val(Text1.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;If sy = "+" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = a + b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;ElseIf sy = "-" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = a - b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;ElseIf sy = "*" Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = a * b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = a / b&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdnums_Click(Index As Integer)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = Text1.Text &amp;amp; cmdnums(Index).Caption&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Private Sub cmdop_Click(Index As Integer)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;a = Val(Text1.Text)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;sy = cmdop(Index).Caption&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;Text1.Text = Empty&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new; font-weight: bold;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8494194541843898295?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8494194541843898295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8494194541843898295' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8494194541843898295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8494194541843898295'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/10/user-control-creating-ocx-file-in-vb.html' title='User Control ,Creating OCX File in VB, Adding OCX to Components .'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2060675117715882548</id><published>2009-07-12T10:24:00.000-07:00</published><updated>2009-07-12T10:27:27.689-07:00</updated><title type='text'>Adodc.Recordset Connectivity</title><content type='html'>&lt;meta equiv="Content-Type" content="text/html; charset=utf-8"&gt;&lt;meta name="ProgId" content="Word.Document"&gt;&lt;meta name="Generator" content="Microsoft Word 14"&gt;&lt;meta name="Originator" content="Microsoft Word 14"&gt;&lt;link style="font-family: verdana;" rel="File-List" href="file:///C:%5CUsers%5Cpop%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_filelist.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;o:officedocumentsettings&gt;   &lt;o:targetscreensize&gt;800x600&lt;/o:TargetScreenSize&gt;  &lt;/o:OfficeDocumentSettings&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;link style="font-family: verdana;" rel="themeData" href="file:///C:%5CUsers%5Cpop%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_themedata.thmx"&gt;&lt;link style="font-family: verdana;" rel="colorSchemeMapping" href="file:///C:%5CUsers%5Cpop%5CAppData%5CLocal%5CTemp%5Cmsohtmlclip1%5C01%5Cclip_colorschememapping.xml"&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:worddocument&gt;   &lt;w:view&gt;Normal&lt;/w:View&gt;   &lt;w:zoom&gt;0&lt;/w:Zoom&gt;   &lt;w:trackmoves/&gt;   &lt;w:trackformatting/&gt;   &lt;w:punctuationkerning/&gt;   &lt;w:validateagainstschemas/&gt;   &lt;w:saveifxmlinvalid&gt;false&lt;/w:SaveIfXMLInvalid&gt;   &lt;w:ignoremixedcontent&gt;false&lt;/w:IgnoreMixedContent&gt;   &lt;w:alwaysshowplaceholdertext&gt;false&lt;/w:AlwaysShowPlaceholderText&gt;   &lt;w:donotpromoteqf/&gt;   &lt;w:lidthemeother&gt;EN-US&lt;/w:LidThemeOther&gt;   &lt;w:lidthemeasian&gt;X-NONE&lt;/w:LidThemeAsian&gt;   &lt;w:lidthemecomplexscript&gt;X-NONE&lt;/w:LidThemeComplexScript&gt;   &lt;w:compatibility&gt;    &lt;w:breakwrappedtables/&gt;    &lt;w:snaptogridincell/&gt;    &lt;w:wraptextwithpunct/&gt;    &lt;w:useasianbreakrules/&gt;    &lt;w:dontgrowautofit/&gt;    &lt;w:splitpgbreakandparamark/&gt;    &lt;w:enableopentypekerning/&gt;    &lt;w:dontflipmirrorindents/&gt;    &lt;w:overridetablestylehps/&gt;   &lt;/w:Compatibility&gt;   &lt;w:browserlevel&gt;MicrosoftInternetExplorer4&lt;/w:BrowserLevel&gt;   &lt;m:mathpr&gt;    &lt;m:mathfont val="Cambria Math"&gt;    &lt;m:brkbin val="before"&gt;    &lt;m:brkbinsub val="&amp;#45;-"&gt;    &lt;m:smallfrac val="off"&gt;    &lt;m:dispdef/&gt;    &lt;m:lmargin val="0"&gt;    &lt;m:rmargin val="0"&gt;    &lt;m:defjc val="centerGroup"&gt;    &lt;m:wrapindent val="1440"&gt;    &lt;m:intlim val="subSup"&gt;    &lt;m:narylim val="undOvr"&gt;   &lt;/m:mathPr&gt;&lt;/w:WordDocument&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;!--[if gte mso 9]&gt;&lt;xml&gt;  &lt;w:latentstyles deflockedstate="false" defunhidewhenused="true" defsemihidden="true" defqformat="false" defpriority="99" latentstylecount="267"&gt;   &lt;w:lsdexception locked="false" priority="0" semihidden="false" unhidewhenused="false" qformat="true" name="Normal"&gt;   &lt;w:lsdexception locked="false" priority="9" semihidden="false" unhidewhenused="false" qformat="true" name="heading 1"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 2"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 3"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 4"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 5"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 6"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 7"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 8"&gt;   &lt;w:lsdexception locked="false" priority="9" qformat="true" name="heading 9"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 1"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 2"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 3"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 4"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 5"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 6"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 7"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 8"&gt;   &lt;w:lsdexception locked="false" priority="39" name="toc 9"&gt;   &lt;w:lsdexception locked="false" priority="35" qformat="true" name="caption"&gt;   &lt;w:lsdexception locked="false" priority="10" semihidden="false" unhidewhenused="false" qformat="true" name="Title"&gt;   &lt;w:lsdexception locked="false" priority="0" name="Default Paragraph Font"&gt;   &lt;w:lsdexception locked="false" priority="11" semihidden="false" unhidewhenused="false" qformat="true" name="Subtitle"&gt;   &lt;w:lsdexception locked="false" priority="22" semihidden="false" unhidewhenused="false" qformat="true" name="Strong"&gt;   &lt;w:lsdexception locked="false" priority="20" semihidden="false" unhidewhenused="false" qformat="true" name="Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="59" semihidden="false" unhidewhenused="false" name="Table Grid"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Placeholder Text"&gt;   &lt;w:lsdexception locked="false" priority="1" semihidden="false" unhidewhenused="false" qformat="true" name="No Spacing"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" unhidewhenused="false" name="Revision"&gt;   &lt;w:lsdexception locked="false" priority="34" semihidden="false" unhidewhenused="false" qformat="true" name="List Paragraph"&gt;   &lt;w:lsdexception locked="false" priority="29" semihidden="false" unhidewhenused="false" qformat="true" name="Quote"&gt;   &lt;w:lsdexception locked="false" priority="30" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Quote"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 1"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 2"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 3"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 4"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 5"&gt;   &lt;w:lsdexception locked="false" priority="60" semihidden="false" unhidewhenused="false" name="Light Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="61" semihidden="false" unhidewhenused="false" name="Light List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="62" semihidden="false" unhidewhenused="false" name="Light Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="63" semihidden="false" unhidewhenused="false" name="Medium Shading 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="64" semihidden="false" unhidewhenused="false" name="Medium Shading 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="65" semihidden="false" unhidewhenused="false" name="Medium List 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="66" semihidden="false" unhidewhenused="false" name="Medium List 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="67" semihidden="false" unhidewhenused="false" name="Medium Grid 1 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="68" semihidden="false" unhidewhenused="false" name="Medium Grid 2 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="69" semihidden="false" unhidewhenused="false" name="Medium Grid 3 Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="70" semihidden="false" unhidewhenused="false" name="Dark List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="71" semihidden="false" unhidewhenused="false" name="Colorful Shading Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="72" semihidden="false" unhidewhenused="false" name="Colorful List Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="73" semihidden="false" unhidewhenused="false" name="Colorful Grid Accent 6"&gt;   &lt;w:lsdexception locked="false" priority="19" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="21" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Emphasis"&gt;   &lt;w:lsdexception locked="false" priority="31" semihidden="false" unhidewhenused="false" qformat="true" name="Subtle Reference"&gt;   &lt;w:lsdexception locked="false" priority="32" semihidden="false" unhidewhenused="false" qformat="true" name="Intense Reference"&gt;   &lt;w:lsdexception locked="false" priority="33" semihidden="false" unhidewhenused="false" qformat="true" name="Book Title"&gt;   &lt;w:lsdexception locked="false" priority="37" name="Bibliography"&gt;   &lt;w:lsdexception locked="false" priority="39" qformat="true" name="TOC Heading"&gt;  &lt;/w:LatentStyles&gt; &lt;/xml&gt;&lt;![endif]--&gt;&lt;style&gt; &lt;!--  /* Font Definitions */  @font-face 	{font-family:"Cambria Math"; 	panose-1:2 4 5 3 5 4 6 3 2 4; 	mso-font-charset:1; 	mso-generic-font-family:roman; 	mso-font-format:other; 	mso-font-pitch:variable; 	mso-font-signature:0 0 0 0 0 0;}  /* Style Definitions */  p.MsoNormal, li.MsoNormal, div.MsoNormal 	{mso-style-unhide:no; 	mso-style-qformat:yes; 	mso-style-parent:""; 	margin:0in; 	margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:12.0pt; 	font-family:"Times New Roman","serif"; 	mso-fareast-font-family:"Times New Roman";} .MsoChpDefault 	{mso-style-type:export-only; 	mso-default-props:yes; 	font-size:10.0pt; 	mso-ansi-font-size:10.0pt; 	mso-bidi-font-size:10.0pt;} @page Section1 	{size:8.5in 11.0in; 	margin:1.0in 1.25in 1.0in 1.25in; 	mso-header-margin:.5in; 	mso-footer-margin:.5in; 	mso-paper-source:0;} div.Section1 	{page:Section1;} --&gt; &lt;/style&gt;&lt;!--[if gte mso 10]&gt; &lt;style&gt;  /* Style Definitions */  table.MsoNormalTable 	{mso-style-name:"Table Normal"; 	mso-tstyle-rowband-size:0; 	mso-tstyle-colband-size:0; 	mso-style-noshow:yes; 	mso-style-priority:99; 	mso-style-parent:""; 	mso-padding-alt:0in 5.4pt 0in 5.4pt; 	mso-para-margin:0in; 	mso-para-margin-bottom:.0001pt; 	mso-pagination:widow-orphan; 	font-size:10.0pt; 	font-family:"Times New Roman","serif";} &lt;/style&gt; &lt;![endif]--&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Private Sub add_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Adodc1.Recordset.AddNew&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Private Sub delete_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Adodc1.Recordset.delete&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Private Sub last_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Adodc1.Recordset.MoveLast&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Private Sub modify_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Adodc1.Recordset.EditMode&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Private Sub next_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Adodc1.Recordset.MoveNext&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Private Sub previous_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Adodc1.Recordset.MovePrevious&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;&lt;o:p&gt; &lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Private Sub save_Click()&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;Adodc1.Recordset.save&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;p class="MsoNormal" style="margin-right: -0.25in; font-family: verdana;"&gt;End Sub&lt;o:p&gt;&lt;/o:p&gt;&lt;/p&gt;  &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2060675117715882548?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2060675117715882548/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2060675117715882548' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2060675117715882548'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2060675117715882548'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/07/adodcrecordset-connectivity.html' title='Adodc.Recordset Connectivity'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5903659023242796056</id><published>2009-02-07T04:10:00.000-08:00</published><updated>2009-02-07T04:16:47.186-08:00</updated><title type='text'>List in memory</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: courier new;"&gt;&lt;/span&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;struct node&lt;br /&gt;{&lt;br /&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;  int x;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;  struct node *next;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;};&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;int main()&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;{&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    /* This won't change, or we would lose the list in memory */&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    struct node *root;       &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    /* This will point to each node as it traverses the list */&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    struct node *conductor;  &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    root = malloc( sizeof(struct node) );  &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    root-&gt;next = 0;   &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    root-&gt;x = 12;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    conductor = root; &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    if ( conductor != 0 ) {&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;        while ( conductor-&gt;next != 0)&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;        {&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;            conductor = conductor-&gt;next;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;        }&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    }&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    /* Creates a node at the end of the list */&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    conductor-&gt;next = malloc( sizeof(struct node) );  &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    conductor = conductor-&gt;next; &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    if ( conductor == 0 )&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    {&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;        printf( "Out of memory" );&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;        return 0;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    }&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    /* initialize the new memory */&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    conductor-&gt;next = 0;         &lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    conductor-&gt;x = 42;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;    return 0;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;}&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;br /&gt;&lt;stdio.h style="font-family: courier new;"&gt;&lt;stdlib.h&gt;&lt;/stdlib.h&gt;&lt;/stdio.h&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5903659023242796056?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5903659023242796056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5903659023242796056' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5903659023242796056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5903659023242796056'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/list-in-memory.html' title='List in memory'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3604864571032276465</id><published>2009-02-04T06:47:00.000-08:00</published><updated>2009-02-04T06:50:12.770-08:00</updated><title type='text'>Show the 'File Open' Common Dialog via API calls</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;To display a file open common dialog use the following routine (an example routine can be found at the bottom of this post):&lt;br /&gt;&lt;br /&gt;Option Explicit&lt;br /&gt;&lt;br /&gt;Private Declare Function GetOpenFileName Lib "comdlg32.dll" Alias "GetOpenFileNameA" (pOpenfilename As OpenFileName) As Long&lt;br /&gt;&lt;br /&gt;Private Type OpenFileName&lt;br /&gt;    lStructSize As Long&lt;br /&gt;    hwndOwner As Long&lt;br /&gt;    hInstance As Long&lt;br /&gt;    lpstrFilter As String&lt;br /&gt;    lpstrCustomFilter As String&lt;br /&gt;    nMaxCustFilter As Long&lt;br /&gt;    nFilterIndex As Long&lt;br /&gt;    lpstrFile As String&lt;br /&gt;    nMaxFile As Long&lt;br /&gt;    lpstrFileTitle As String&lt;br /&gt;    nMaxFileTitle As Long&lt;br /&gt;    lpstrInitialDir As String&lt;br /&gt;    lpstrTitle As String&lt;br /&gt;    flags As Long&lt;br /&gt;    nFileOffset As Integer&lt;br /&gt;    nFileExtension As Integer&lt;br /&gt;    lpstrDefExt As String&lt;br /&gt;    lCustData As Long&lt;br /&gt;    lpfnHook As Long&lt;br /&gt;    lpTemplateName As String&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;'Purpose     :  Allows the user to select a file name from a local or network directory.&lt;br /&gt;'Inputs      :  sInitDir            The initial directory of the file dialog.&lt;br /&gt;'               sFileFilters        A file filter string, with the following format:&lt;br /&gt;'                                   eg. "Excel Files;*.xls|Text Files;*.txt|Word Files;*.doc"&lt;br /&gt;'               [sTitle]            The dialog title&lt;br /&gt;'               [lParentHwnd]       The handle to the parent dialog that is calling this function.&lt;br /&gt;'Outputs     :  Returns the selected path and file name or a zero length string if the user pressed cancel&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function BrowseForFile(sInitDir As String, Optional ByVal sFileFilters As String, Optional sTitle As String = "Open File", Optional lParentHwnd As Long) As String&lt;br /&gt;    Dim tFileBrowse As OpenFileName&lt;br /&gt;    Const clMaxLen As Long = 254&lt;br /&gt;   &lt;br /&gt;    tFileBrowse.lStructSize = Len(tFileBrowse)&lt;br /&gt;   &lt;br /&gt;    'Replace friendly deliminators with nulls&lt;br /&gt;    sFileFilters = Replace(sFileFilters, "|", vbNullChar)&lt;br /&gt;    sFileFilters = Replace(sFileFilters, ";", vbNullChar)&lt;br /&gt;    If Right$(sFileFilters, 1) &lt;&gt; vbNullChar Then&lt;br /&gt;        'Add final delimiter&lt;br /&gt;        sFileFilters = sFileFilters &amp;amp; vbNullChar&lt;br /&gt;    End If&lt;br /&gt;   &lt;br /&gt;    'Select a filter&lt;br /&gt;    tFileBrowse.lpstrFilter = sFileFilters &amp;amp; "All Files (*.*)" &amp;amp; vbNullChar &amp;amp; "*.*" &amp;amp; vbNullChar&lt;br /&gt;    'create a buffer for the file&lt;br /&gt;    tFileBrowse.lpstrFile = String(clMaxLen, " ")&lt;br /&gt;    'set the maximum length of a returned file&lt;br /&gt;    tFileBrowse.nMaxFile = clMaxLen + 1&lt;br /&gt;    'Create a buffer for the file title&lt;br /&gt;    tFileBrowse.lpstrFileTitle = Space$(clMaxLen)&lt;br /&gt;    'Set the maximum length of a returned file title&lt;br /&gt;    tFileBrowse.nMaxFileTitle = clMaxLen + 1&lt;br /&gt;    'Set the initial directory&lt;br /&gt;    tFileBrowse.lpstrInitialDir = sInitDir&lt;br /&gt;    'Set the parent handle&lt;br /&gt;    tFileBrowse.hwndOwner = lParentHwnd&lt;br /&gt;    'Set the title&lt;br /&gt;    tFileBrowse.lpstrTitle = sTitle&lt;br /&gt;   &lt;br /&gt;    'No flags&lt;br /&gt;    tFileBrowse.flags = 0&lt;br /&gt;&lt;br /&gt;    'Show the dialog&lt;br /&gt;    If GetOpenFileName(tFileBrowse) Then&lt;br /&gt;        BrowseForFile = Trim$(tFileBrowse.lpstrFile)&lt;br /&gt;        If Right$(BrowseForFile, 1) = vbNullChar Then&lt;br /&gt;            'Remove trailing null&lt;br /&gt;            BrowseForFile = Left$(BrowseForFile, Len(BrowseForFile) - 1)&lt;br /&gt;        End If&lt;br /&gt;    End If&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Sub Test()&lt;br /&gt;    BrowseForFile "c:\", "Excel File (*.xls);*.xls", "Open Workbook"&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3604864571032276465?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3604864571032276465/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3604864571032276465' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3604864571032276465'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3604864571032276465'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/show-file-open-common-dialog-via-api.html' title='Show the &apos;File Open&apos; Common Dialog via API calls'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1439080136582148775</id><published>2009-02-04T06:46:00.000-08:00</published><updated>2009-02-04T06:47:03.283-08:00</updated><title type='text'>Show the 'Choose a Color' Common Dialog</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Option Explicit&lt;br /&gt;Private Declare Function ChooseColorA Lib "comdlg32.dll" (pChoosecolor As tChooseColor) As Long&lt;br /&gt;Private Declare Function GetActiveWindow Lib "user32" () As Long&lt;br /&gt;&lt;br /&gt;Private Type tChooseColor&lt;br /&gt;    lStructSize As Long&lt;br /&gt;    hwndOwner As Long&lt;br /&gt;    hInstance As Long&lt;br /&gt;    rgbResult As Long&lt;br /&gt;    lpCustColors As String&lt;br /&gt;    flags As Long&lt;br /&gt;    lCustData As Long&lt;br /&gt;    lpfnHook As Long&lt;br /&gt;    lpTemplateName As String&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;'Purpose     :  Shows the Choose Color Dialog&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;'Inputs      :  N/A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;'Outputs     :  Returns -1 if the user pressed cancel, else returns the selected color&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function ShowColor() As Long&lt;br /&gt;    Dim tColor As tChooseColor&lt;br /&gt;    Dim Custcolor(16) As Long&lt;br /&gt;    Dim lReturn As Long, lThisColor As Long&lt;br /&gt;    Dim abytCustomColors(0 To 16 * 4 - 1) As Byte&lt;br /&gt;   &lt;br /&gt;    For lThisColor = LBound(abytCustomColors) To UBound(abytCustomColors)&lt;br /&gt;        abytCustomColors(lThisColor) = 0&lt;br /&gt;    Next&lt;br /&gt;&lt;br /&gt;    tColor.lStructSize = Len(tColor)&lt;br /&gt;    tColor.hwndOwner = GetActiveWindow        'or Me.hwnd in VB&lt;br /&gt;    tColor.hInstance = 1       'or App.hInstance in VB&lt;br /&gt;    'Convert the custom colors to Unicode&lt;br /&gt;    tColor.lpCustColors = StrConv(abytCustomColors, vbUnicode)&lt;br /&gt;    tColor.flags = 0&lt;br /&gt;&lt;br /&gt;    'Show the dialog&lt;br /&gt;    If ChooseColorA(tColor) &lt;&gt; 0 Then&lt;br /&gt;        ShowColor = tColor.rgbResult&lt;br /&gt;    Else&lt;br /&gt;        ShowColor = -1&lt;br /&gt;    End If&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1439080136582148775?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1439080136582148775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1439080136582148775' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1439080136582148775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1439080136582148775'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/show-choose-color-common-dialog.html' title='Show the &apos;Choose a Color&apos; Common Dialog'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-4874525247299320718</id><published>2009-02-04T06:45:00.002-08:00</published><updated>2009-02-04T06:46:09.658-08:00</updated><title type='text'>Displaying The Windows Colour Dialog</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;'Declare various Types, ENums and Functions.&lt;br /&gt;Private Type udtCHOOSECOLOR&lt;br /&gt;    lStructSize As Long&lt;br /&gt;    hWndOwner As Long&lt;br /&gt;    hInstance As Long&lt;br /&gt;    rgbResult As Long&lt;br /&gt;    lpCustColors As Long&lt;br /&gt;    Flags As Long&lt;br /&gt;    lCustData As Long&lt;br /&gt;    lpfnHook As Long&lt;br /&gt;    lpTemplateName As String&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;Public Enum ColorDialogFlags&lt;br /&gt;    UseInitialColor = &amp;amp;H1&lt;br /&gt;    ShowCustomColorsOnLoad = &amp;amp;H2&lt;br /&gt;    DisableCustomColors = &amp;amp;H4&lt;br /&gt;    ShowHelp = &amp;amp;H8&lt;br /&gt;    OnlySolidColors = &amp;amp;H80&lt;br /&gt;    AllowAnyColor = &amp;amp;H100&lt;br /&gt;    Default = &amp;amp;H1 Or &amp;amp;H100&lt;br /&gt;End Enum&lt;br /&gt;&lt;br /&gt;Private CDColor As udtCHOOSECOLOR&lt;br /&gt;&lt;br /&gt;Private Declare Function ChooseColor Lib "comdlg32.dll" _&lt;br /&gt; Alias "ChooseColorA" (pChoosecolor As udtCHOOSECOLOR) As Long&lt;br /&gt;Private Declare Function CommDlgExtendedError Lib "comdlg32.dll" () As Long&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function GetColor(ByVal T_hWnd As Long, ByVal Flags As ColorDialogFlags, _&lt;br /&gt; Optional ByVal InitialColor As Long) As Long&lt;br /&gt;    'Dimension a variable.&lt;br /&gt;    Dim CustColors(0 To 15) As Long&lt;br /&gt;   &lt;br /&gt;    'Set up the colour configuration.&lt;br /&gt;    For I = 0 To 15&lt;br /&gt;        CustColors(I) = vbWhite&lt;br /&gt;    Next&lt;br /&gt;    CDColor.Flags = Flags&lt;br /&gt;    CDColor.hWndOwner = T_hWnd&lt;br /&gt;    CDColor.hInstance = App.hInstance&lt;br /&gt;    CDColor.lpCustColors = VarPtr(CustColors(0))&lt;br /&gt;    CDColor.lStructSize = Len(CDColor)&lt;br /&gt;    CDColor.rgbResult = InitialColor&lt;br /&gt;    lngResult = ChooseColor(CDColor)&lt;br /&gt;   &lt;br /&gt;    'Get the colour that is selected.&lt;br /&gt;    If lngResult = 1 And CommDlgExtendedError = 0 Then&lt;br /&gt;        GetColor = CDColor.rgbResult&lt;br /&gt;    Else&lt;br /&gt;        GetColor = -1&lt;br /&gt;    End If&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-4874525247299320718?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/4874525247299320718/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=4874525247299320718' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4874525247299320718'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/4874525247299320718'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/displaying-windows-colour-dialog.html' title='Displaying The Windows Colour Dialog'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2579628276762212045</id><published>2009-02-04T06:45:00.001-08:00</published><updated>2009-02-04T06:45:37.327-08:00</updated><title type='text'>Displaying The Search For Directory Dialog</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Private Declare Function SHBrowseForFolder _&lt;br /&gt; Lib "shell32" (lpbi As BrowseInfo) As Long&lt;br /&gt;&lt;br /&gt;Private Declare Function SHGetPathFromIDList _&lt;br /&gt; Lib "shell32" (ByVal pidList As Long, _&lt;br /&gt; ByVal lpBuffer As String) As Long&lt;br /&gt;&lt;br /&gt;Private Declare Function lstrcat Lib "kernel32" _&lt;br /&gt; Alias "lstrcatA" (ByVal lpString1 As String, ByVal _&lt;br /&gt; lpString2 As String) As Long&lt;br /&gt;&lt;br /&gt;Private Const BIF_RETURNONLYFSDIRS = 1&lt;br /&gt;Private Const BIF_DONTGOBELOWDOMAIN = 2&lt;br /&gt;Private Const MAX_PATH = 260&lt;br /&gt;&lt;br /&gt;Private Type BrowseInfo&lt;br /&gt;    hWndOwner As Long&lt;br /&gt;    pIDLRoot As Long&lt;br /&gt;    pszDisplayName As Long&lt;br /&gt;    lpszTitle As Long&lt;br /&gt;    ulFlags As Long&lt;br /&gt;    lpfnCallback As Long&lt;br /&gt;    lParam As Long&lt;br /&gt;    iImage As Long&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;'Wrapper Function.&lt;br /&gt;Private Sub DirBox(Msg As String, Directory As String)&lt;br /&gt;&lt;br /&gt;    'Dimension some variables.&lt;br /&gt;    Dim lpIDList As Long&lt;br /&gt;    Dim sBuffer As String&lt;br /&gt;    Dim szTitle As String&lt;br /&gt;    Dim tBrowseInfo As BrowseInfo&lt;br /&gt;   &lt;br /&gt;    'Set the message displayed on the dialog.&lt;br /&gt;    szTitle = Msg&lt;br /&gt;   &lt;br /&gt;    'Set up the Type.&lt;br /&gt;    With tBrowseInfo&lt;br /&gt;       .hWndOwner = Me.hWnd&lt;br /&gt;       .lpszTitle = lstrcat(szTitle, "")&lt;br /&gt;       .ulFlags = BIF_RETURNONLYFSDIRS + BIF_DONTGOBELOWDOMAIN&lt;br /&gt;    End With&lt;br /&gt;   &lt;br /&gt;    'Show the dialog box.&lt;br /&gt;    lpIDList = SHBrowseForFolder(tBrowseInfo)&lt;br /&gt;&lt;br /&gt;    'Process the data returned.&lt;br /&gt;    If (lpIDList) Then&lt;br /&gt;       sBuffer = Space(MAX_PATH)&lt;br /&gt;       SHGetPathFromIDList lpIDList, sBuffer&lt;br /&gt;       sBuffer = Left(sBuffer, InStr(sBuffer, vbNullChar) - 1)&lt;br /&gt;       Directory = sBuffer&lt;br /&gt;    End If&lt;br /&gt;&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2579628276762212045?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2579628276762212045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2579628276762212045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2579628276762212045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2579628276762212045'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/displaying-search-for-directory-dialog.html' title='Displaying The Search For Directory Dialog'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-943521399880002765</id><published>2009-02-04T06:43:00.001-08:00</published><updated>2009-02-04T06:43:50.741-08:00</updated><title type='text'>Displaying The Common Save Dialog</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;'The API Function.&lt;br /&gt;Public Declare Function GetSaveFileName Lib "comdlg32.dll" _&lt;br /&gt; Alias "GetSaveFileNameA" (pOpenfilename As OPENFILENAME) As Long&lt;br /&gt;&lt;br /&gt;'Now come some Types.&lt;br /&gt;Public Enum GFNFlags&lt;br /&gt;    OFN_ALLOWMULTISELECT = &amp;amp;H200&lt;br /&gt;    OFN_CREATEPROMPT = &amp;amp;H2000&lt;br /&gt;    OFN_EXPLORER = &amp;amp;H80000&lt;br /&gt;    OFN_FILEMUSTEXIST = &amp;amp;H1000&lt;br /&gt;    OFN_HIDEREADONLY = &amp;amp;H4&lt;br /&gt;    OFN_LONGNAMES = &amp;amp;H200000&lt;br /&gt;    OFN_NOCHANGEDIR = &amp;amp;H8&lt;br /&gt;    OFN_NODEREFERENCELINKS = &amp;amp;H100000&lt;br /&gt;    OFN_NOLONGNAMES = &amp;amp;H40000&lt;br /&gt;    OFN_NONETWORKBUTTON = &amp;amp;H20000&lt;br /&gt;    OFN_NOREADONLYRETURN = &amp;amp;H8000&lt;br /&gt;    OFN_NOTESTFILECREATE = &amp;amp;H10000&lt;br /&gt;    OFN_NOVALIDATE = &amp;amp;H100&lt;br /&gt;    OFN_OVERWRITEPROMPT = &amp;amp;H2&lt;br /&gt;    OFN_PATHMUSTEXIST = &amp;amp;H800&lt;br /&gt;    OFN_READONLY = &amp;amp;H1&lt;br /&gt;End Enum&lt;br /&gt;&lt;br /&gt;Type OPENFILENAME&lt;br /&gt;   lStructSize As Long&lt;br /&gt;   hwndOwner As Long&lt;br /&gt;   hInstance As Long&lt;br /&gt;   lpstrFilter As String&lt;br /&gt;   lpstrCustomFilter As String&lt;br /&gt;   nMaxCustFilter As Long&lt;br /&gt;   nFilterIndex As Long&lt;br /&gt;   lpstrFile As String&lt;br /&gt;   nMaxFile As Long&lt;br /&gt;   lpstrFileTitle As String&lt;br /&gt;   nMaxFileTitle As Long&lt;br /&gt;   lpstrInitialDir As String&lt;br /&gt;   lpstrTitle As String&lt;br /&gt;   Flags As Long&lt;br /&gt;   nFileOffset As Integer&lt;br /&gt;   nFileExtension As Integer&lt;br /&gt;   lpstrDefExt As String&lt;br /&gt;   lCustData As Long&lt;br /&gt;   lpfnHook As Long&lt;br /&gt;   lpTemplateName As String&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;'This is the wrapper Function.&lt;br /&gt;Public Function SaveDialog(ByVal OwnerhWnd As Long, _&lt;br /&gt; ByVal Filters As String, ByVal FilterIndex As Long, _&lt;br /&gt; ByVal FNameLength As Long, _&lt;br /&gt; Optional ByVal InitFolder As String = "", _&lt;br /&gt; Optional ByVal InitFileName As String = "", _&lt;br /&gt; Optional ByVal dlgTitle As String = "", _&lt;br /&gt; Optional ByVal Flags As GFNFlags = 0) As String&lt;br /&gt;    'Dimension some variables.&lt;br /&gt;    Dim GFN As OPENFILENAME&lt;br /&gt;   &lt;br /&gt;    'Sort out some of the Type we will pass.&lt;br /&gt;    GFN.lStructSize = Len(GFN)&lt;br /&gt;    GFN.hwndOwner = OwnerhWnd&lt;br /&gt;    GFN.hInstance = App.hInstance&lt;br /&gt;   &lt;br /&gt;    'Sort out the filters.&lt;br /&gt;    For I = 1 To Len(Filters)&lt;br /&gt;        If Mid$(Filters, I, 1) = "|" Then&lt;br /&gt;            Filters = Left$(Filters, I - 1) &amp;amp; Chr$(0) &amp;amp; _&lt;br /&gt;             Right$(Filters, Len(Filters) - I)&lt;br /&gt;        End If&lt;br /&gt;    Next&lt;br /&gt;   &lt;br /&gt;    'Finish setting up the Type.&lt;br /&gt;    GFN.lpstrFilter = Filters&lt;br /&gt;    GFN.nFilterIndex = FilterIndex&lt;br /&gt;    GFN.lpstrFile = InitFileName &amp;amp; String$(FNameLength - Len(InitFileName), Chr$(0))&lt;br /&gt;    GFN.nMaxFile = FNameLength&lt;br /&gt;    GFN.lpstrFileTitle = String$(FNameLength, Chr$(0))&lt;br /&gt;    GFN.nMaxFileTitle = FNameLength&lt;br /&gt;    GFN.lpstrInitialDir = InitFolder&lt;br /&gt;    GFN.lpstrTitle = dlgTitle&lt;br /&gt;    GFN.Flags = Flags&lt;br /&gt;   &lt;br /&gt;    'Get and return the filename.&lt;br /&gt;    If GetSaveFileName(GFN) &gt;= 1 Then&lt;br /&gt;        SaveDialog = GFN.lpstrFile&lt;br /&gt;    Else&lt;br /&gt;        SaveDialog = Chr$(0)&lt;br /&gt;    End If&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-943521399880002765?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/943521399880002765/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=943521399880002765' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/943521399880002765'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/943521399880002765'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/displaying-common-save-dialog.html' title='Displaying The Common Save Dialog'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-6689290686844666941</id><published>2009-02-04T06:37:00.000-08:00</published><updated>2009-02-04T06:41:36.430-08:00</updated><title type='text'></title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;'The API Function.&lt;br /&gt;Public Declare Function GetOpenFileName Lib "comdlg32.dll" _&lt;br /&gt; Alias "GetOpenFileNameA" (pOpenfilename As OPENFILENAME) As Long&lt;br /&gt;&lt;br /&gt;'Now come some Types.&lt;br /&gt;Public Enum GFNFlags&lt;br /&gt;    OFN_ALLOWMULTISELECT = &amp;amp;H200&lt;br /&gt;    OFN_CREATEPROMPT = &amp;amp;H2000&lt;br /&gt;    OFN_EXPLORER = &amp;amp;H80000&lt;br /&gt;    OFN_FILEMUSTEXIST = &amp;amp;H1000&lt;br /&gt;    OFN_HIDEREADONLY = &amp;amp;H4&lt;br /&gt;    OFN_LONGNAMES = &amp;amp;H200000&lt;br /&gt;    OFN_NOCHANGEDIR = &amp;amp;H8&lt;br /&gt;    OFN_NODEREFERENCELINKS = &amp;amp;H100000&lt;br /&gt;    OFN_NOLONGNAMES = &amp;amp;H40000&lt;br /&gt;    OFN_NONETWORKBUTTON = &amp;amp;H20000&lt;br /&gt;    OFN_NOREADONLYRETURN = &amp;amp;H8000&lt;br /&gt;    OFN_NOTESTFILECREATE = &amp;amp;H10000&lt;br /&gt;    OFN_NOVALIDATE = &amp;amp;H100&lt;br /&gt;    OFN_OVERWRITEPROMPT = &amp;amp;H2&lt;br /&gt;    OFN_PATHMUSTEXIST = &amp;amp;H800&lt;br /&gt;    OFN_READONLY = &amp;amp;H1&lt;br /&gt;End Enum&lt;br /&gt;&lt;br /&gt;Type OPENFILENAME&lt;br /&gt;   lStructSize As Long&lt;br /&gt;   hwndOwner As Long&lt;br /&gt;   hInstance As Long&lt;br /&gt;   lpstrFilter As String&lt;br /&gt;   lpstrCustomFilter As String&lt;br /&gt;   nMaxCustFilter As Long&lt;br /&gt;   nFilterIndex As Long&lt;br /&gt;   lpstrFile As String&lt;br /&gt;   nMaxFile As Long&lt;br /&gt;   lpstrFileTitle As String&lt;br /&gt;   nMaxFileTitle As Long&lt;br /&gt;   lpstrInitialDir As String&lt;br /&gt;   lpstrTitle As String&lt;br /&gt;   Flags As Long&lt;br /&gt;   nFileOffset As Integer&lt;br /&gt;   nFileExtension As Integer&lt;br /&gt;   lpstrDefExt As String&lt;br /&gt;   lCustData As Long&lt;br /&gt;   lpfnHook As Long&lt;br /&gt;   lpTemplateName As String&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;'This is the wrapper Function.&lt;br /&gt;Public Function OpenDialog(ByVal OwnerhWnd As Long, _&lt;br /&gt; ByVal Filters As String, ByVal FilterIndex As Long, _&lt;br /&gt; ByVal FNameLength As Long, _&lt;br /&gt; Optional ByVal InitFolder As String = "", _&lt;br /&gt; Optional ByVal InitFileName As String = "", _&lt;br /&gt; Optional ByVal dlgTitle As String = "", _&lt;br /&gt; Optional ByVal Flags As GFNFlags = 0) As String&lt;br /&gt;    'Dimension some variables.&lt;br /&gt;    Dim GFN As OPENFILENAME&lt;br /&gt;   &lt;br /&gt;    'Sort out some of the Type we will pass.&lt;br /&gt;    GFN.lStructSize = Len(GFN)&lt;br /&gt;    GFN.hwndOwner = OwnerhWnd&lt;br /&gt;    GFN.hInstance = App.hInstance&lt;br /&gt;   &lt;br /&gt;    'Sort out the filters.&lt;br /&gt;    For I = 1 To Len(Filters)&lt;br /&gt;        If Mid$(Filters, I, 1) = "|" Then&lt;br /&gt;            Filters = Left$(Filters, I - 1) &amp;amp; Chr$(0) &amp;amp; _&lt;br /&gt;             Right$(Filters, Len(Filters) - I)&lt;br /&gt;        End If&lt;br /&gt;    Next&lt;br /&gt;   &lt;br /&gt;    'Finish setting up the Type.&lt;br /&gt;    GFN.lpstrFilter = Filters&lt;br /&gt;    GFN.nFilterIndex = FilterIndex&lt;br /&gt;    GFN.lpstrFile = InitFileName &amp;amp; String$(FNameLength - Len(InitFileName), Chr$(0))&lt;br /&gt;    GFN.nMaxFile = FNameLength&lt;br /&gt;    GFN.lpstrFileTitle = String$(FNameLength, Chr$(0))&lt;br /&gt;    GFN.nMaxFileTitle = FNameLength&lt;br /&gt;    GFN.lpstrInitialDir = InitFolder&lt;br /&gt;    GFN.lpstrTitle = dlgTitle&lt;br /&gt;    GFN.Flags = Flags&lt;br /&gt;   &lt;br /&gt;    'Get and return the filename.&lt;br /&gt;    If GetOpenFileName(GFN) &gt;= 1 Then&lt;br /&gt;        OpenDialog = GFN.lpstrFile&lt;br /&gt;    Else&lt;br /&gt;        OpenDialog = Chr$(0)&lt;br /&gt;    End If&lt;br /&gt;&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-6689290686844666941?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/6689290686844666941/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=6689290686844666941' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6689290686844666941'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/6689290686844666941'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/1-then-opendialog-gfn.html' title=''/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1116438027885850316</id><published>2009-02-04T02:46:00.000-08:00</published><updated>2009-02-04T02:50:23.176-08:00</updated><title type='text'>Send the text in a range to a word document</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div style="text-align: justify;"&gt;&lt;span style="font-size:85%;"&gt;'Purpose     :  Sends the text in a range to a word application&lt;br /&gt;'Inputs      :  rngSelection                The range to send to a word document&lt;br /&gt;'Outputs     :  Returns True on success.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function WordSendRangeTo(rngSelection As Object, Optional sSaveToFile As String, Optional bShowWord As Boolean = False) As Boolean&lt;br /&gt;   Dim oWordApp As Object          'Early bound type = Word.Application&lt;br /&gt;   Dim oNewDoc As Object           'Early bound type = Word.Document&lt;br /&gt;   Dim oWordRange As Object        'Early bound type = Word.Range&lt;br /&gt;   Dim avVaules As Variant, vCell As Variant, sText As String&lt;br /&gt;&lt;br /&gt;   On Error GoTo ErrFailed&lt;br /&gt;   'Build up text to send to word document&lt;br /&gt;   avVaules = rngSelection.Value&lt;br /&gt;   For Each vCell In avVaules&lt;br /&gt;       sText = sText &amp;amp; vCell &amp;amp; " "&lt;br /&gt;   Next&lt;br /&gt;   sText = Trim$(sText)&lt;br /&gt;&lt;br /&gt;   'Create word objects&lt;br /&gt;   Set oWordApp = CreateObject("Word.Application")&lt;br /&gt;   Set oNewDoc = oWordApp.Documents.Add&lt;br /&gt;   Set oWordRange = oNewDoc.Words(1)&lt;br /&gt;&lt;br /&gt;   'Send text to word document&lt;br /&gt;   With oWordRange&lt;br /&gt;       .Text = sText&lt;br /&gt;       On Error Resume Next&lt;br /&gt;       Set .Font = rngSelection.Font&lt;br /&gt;   End With&lt;br /&gt;   On Error GoTo ErrFailed&lt;br /&gt;&lt;br /&gt;   'Save Document&lt;br /&gt;   If Len(sSaveToFile) Then&lt;br /&gt;       oNewDoc.SaveAs sSaveToFile&lt;br /&gt;   End If&lt;br /&gt;&lt;br /&gt;   If bShowWord Then&lt;br /&gt;       'Show Word&lt;br /&gt;       oWordApp.Visible = True&lt;br /&gt;       oWordApp.WindowState = 1    'wdWindowStateMaximize&lt;br /&gt;   Else&lt;br /&gt;       'Quit word&lt;br /&gt;       oWordApp.Quit&lt;br /&gt;   End If&lt;br /&gt;&lt;br /&gt;   WordSendRangeTo = True&lt;br /&gt;   GoTo ExitSub&lt;br /&gt;&lt;br /&gt;ErrFailed:&lt;br /&gt;   'Error occurred&lt;br /&gt;   WordSendRangeTo = False&lt;br /&gt;&lt;br /&gt;ExitSub:&lt;br /&gt;   'De-reference objects&lt;br /&gt;   Set oWordApp = Nothing&lt;br /&gt;   Set oNewDoc = Nothing&lt;br /&gt;   Set oWordRange = Nothing&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;'Demonstration routine&lt;br /&gt;Sub Test()&lt;br /&gt;   WordSendRangeTo Selection, "C:\test.doc"&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;                        &lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1116438027885850316?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1116438027885850316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1116438027885850316' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1116438027885850316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1116438027885850316'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/send-text-in-range-to-word-document.html' title='Send the text in a range to a word document'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1750599343470427082</id><published>2009-02-04T02:45:00.000-08:00</published><updated>2009-02-04T02:46:39.192-08:00</updated><title type='text'>Start, Stop and Pause NT Services</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: courier new;"&gt;Option Explicit&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Public Enum eServiceState&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    essStopService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    essStartService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    essPauseService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Enum&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Declare Function CloseServiceHandle Lib "advapi32.dll" (ByVal hSCObject As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Declare Function ControlService Lib "advapi32.dll" (ByVal lHwndService As Long, ByVal dwControl As Long, lpServiceStatus As SERVICE_STATUS) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Declare Function OpenSCManager Lib "advapi32.dll" Alias "OpenSCManagerA" (ByVal lpMachineName As String, ByVal lpDatabaseName As String, ByVal dwDesiredAccess As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Declare Function OpenService Lib "advapi32.dll" Alias "OpenServiceA" (ByVal hSCManager As Long, ByVal lpServiceName As String, ByVal dwDesiredAccess As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Declare Function QueryServiceStatus Lib "advapi32.dll" (ByVal lHwndService As Long, lpServiceStatus As SERVICE_STATUS) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Declare Function StartService Lib "advapi32.dll" Alias "StartServiceA" (ByVal lHwndService As Long, ByVal dwNumServiceArgs As Long, ByVal lpServiceArgVectors As Long) As Long&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICES_ACTIVE_DATABASE = "ServicesActive"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_CONTROL_STOP = &amp;amp;H1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_CONTROL_PAUSE = &amp;amp;H2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_STOPPED = &amp;amp;H1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_START_PENDING = &amp;amp;H2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_STOP_PENDING = &amp;amp;H3&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_RUNNING = &amp;amp;H4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_CONTINUE_PENDING = &amp;amp;H5&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_PAUSE_PENDING = &amp;amp;H6&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_PAUSED = &amp;amp;H7&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const STANDARD_RIGHTS_REQUIRED = &amp;amp;HF0000&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SC_MANAGER_CONNECT = &amp;amp;H1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SC_MANAGER_CREATE_SERVICE = &amp;amp;H2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SC_MANAGER_ENUMERATE_SERVICE = &amp;amp;H4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SC_MANAGER_LOCK = &amp;amp;H8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SC_MANAGER_QUERY_LOCK_STATUS = &amp;amp;H10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SC_MANAGER_MODIFY_BOOT_CONFIG = &amp;amp;H20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SC_MANAGER_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SC_MANAGER_CONNECT Or SC_MANAGER_CREATE_SERVICE Or SC_MANAGER_ENUMERATE_SERVICE Or SC_MANAGER_LOCK Or SC_MANAGER_QUERY_LOCK_STATUS Or SC_MANAGER_MODIFY_BOOT_CONFIG)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_QUERY_CONFIG = &amp;amp;H1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_CHANGE_CONFIG = &amp;amp;H2&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_QUERY_STATUS = &amp;amp;H4&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_ENUMERATE_DEPENDENTS = &amp;amp;H8&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_START = &amp;amp;H10&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_STOP = &amp;amp;H20&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_PAUSE_CONTINUE = &amp;amp;H40&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_INTERROGATE = &amp;amp;H80&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_USER_DEFINED_CONTROL = &amp;amp;H100&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Const SERVICE_ALL_ACCESS = (STANDARD_RIGHTS_REQUIRED Or SERVICE_QUERY_CONFIG Or SERVICE_CHANGE_CONFIG Or SERVICE_QUERY_STATUS Or SERVICE_ENUMERATE_DEPENDENTS Or SERVICE_START Or SERVICE_STOP Or SERVICE_PAUSE_CONTINUE Or SERVICE_INTERROGATE Or SERVICE_USER_DEFINED_CONTROL)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Private Type SERVICE_STATUS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    dwServiceType As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    dwCurrentState As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    dwControlsAccepted As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    dwWin32ExitCode As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    dwServiceSpecificExitCode As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    dwCheckPoint As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    dwWaitHint As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Type&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt; &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Purpose     :  Returns the status of a NT Service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Inputs      :  sServiceName                The name of the service to test&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               [sComputerName]             The name of the machine to test the service status on.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'                                           If unspecified uses the local machine&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Outputs     :  Returns a English description of the service status&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Public Function ServiceStatus(sServiceName As String, Optional sComputerName As String) As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim tServiceStat As SERVICE_STATUS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lHwndSManager As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lHwndService As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim hServiceStatus As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    'Check the input data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    If InStr(1, sServiceName, " ") Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Debug.Print "Service names cannot contain spaces. Use the 'Service Name' of the service, not the 'Display Name'"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Exit Function&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    ServiceStatus = ""&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    'Open the service manager&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    lHwndSManager = OpenSCManager(sComputerName, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    If lHwndSManager &lt;&gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        'Open the service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        lHwndService = OpenService(lHwndSManager, sServiceName, SERVICE_ALL_ACCESS)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        If lHwndService &lt;&gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            'Query the service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            hServiceStatus = QueryServiceStatus(lHwndService, tServiceStat)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            If hServiceStatus &lt;&gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Select Case tServiceStat.dwCurrentState&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Case SERVICE_STOPPED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    ServiceStatus = "Stopped"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Case SERVICE_START_PENDING&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    ServiceStatus = "Start Pending"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Case SERVICE_STOP_PENDING&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    ServiceStatus = "Stop Pending"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Case SERVICE_RUNNING&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    ServiceStatus = "Running"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Case SERVICE_CONTINUE_PENDING&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    ServiceStatus = "Coninue Pending"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Case SERVICE_PAUSE_PENDING&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    ServiceStatus = "Pause Pending"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Case SERVICE_PAUSED&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    ServiceStatus = "Paused"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                End Select&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            'Close the service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            CloseServiceHandle lHwndService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        'Close the service mananger&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        CloseServiceHandle lHwndSManager&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Purpose     :  Changes the state of an NT Service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Inputs      :  sServiceName                The name of the service to test&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               [sComputerName]             The name of the machine to test the service status on.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'                                           If unspecified uses the local machine&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Outputs     :  N/A&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Public Function ServiceStateChange(sServiceName As String, eState As eServiceState, Optional sComputerName As String) As Boolean&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim tServiceStatus As SERVICE_STATUS&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lHwndSManager As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lHwndService As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lRes As Long&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    'Check the input data&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    If InStr(1, sServiceName, " ") Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Debug.Print "Service names cannot contain spaces. Use the 'Service Name' of the service, not the 'Display Name'"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        ServiceStateChange = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Exit Function&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    'Open the service manager&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    lHwndSManager = OpenSCManager(sComputerName, SERVICES_ACTIVE_DATABASE, SC_MANAGER_ALL_ACCESS)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    If lHwndSManager &lt;&gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        'Open the service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        lHwndService = OpenService(lHwndSManager, sServiceName, SERVICE_ALL_ACCESS)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        If lHwndService &lt;&gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Select Case eState&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Case essPauseService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                'Pause the service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                lRes = ControlService(lHwndService, SERVICE_CONTROL_PAUSE, tServiceStatus)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Case essStartService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                'Start the service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                lRes = StartService(lHwndService, 0, 0)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Case essStopService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                lRes = ControlService(lHwndService, SERVICE_CONTROL_STOP, tServiceStatus)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Case Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Debug.Print "Invalid Service State"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Debug.Assert False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            End Select&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            If lRes Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                'Success&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                ServiceStateChange = True&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                'Failed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                ServiceStateChange = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Debug.Print "Error in ServiceStateChange: " &amp;amp; Err.LastDllError&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Debug.Assert False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            CloseServiceHandle lHwndService&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        CloseServiceHandle lHwndSManager&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Debug.Print "Failed to open service mananger!"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Debug.Assert False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        ServiceStateChange = False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Demonstration routine using the "Windows Time" service&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sub Test()&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim sStatus As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    sStatus = ServiceStatus("W32Time")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Print "Event Log is now " &amp;amp; sStatus&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Call ServiceStateChange("W32Time", essStopService)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    sStatus = ServiceStatus("W32Time")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Print "Event Log is now " &amp;amp; sStatus&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Call ServiceStateChange("W32Time", essStartService)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    sStatus = ServiceStatus("Eventlog")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Print "Event Log is now " &amp;amp; sStatus&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1750599343470427082?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1750599343470427082/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1750599343470427082' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1750599343470427082'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1750599343470427082'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/start-stop-and-pause-nt-services.html' title='Start, Stop and Pause NT Services'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7147943305151235844</id><published>2009-02-04T02:43:00.000-08:00</published><updated>2009-02-04T02:44:46.547-08:00</updated><title type='text'>Determining the system folder locations</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Option Explicit&lt;br /&gt;&lt;br /&gt;Public Enum epPath&lt;br /&gt;    CSIDL_DESKTOP = &amp;amp;H0&lt;br /&gt;    CSIDL_INTERNET = &amp;amp;H1&lt;br /&gt;    CSIDL_PROGRAMS = &amp;amp;H2&lt;br /&gt;    CSIDL_CONTROLS = &amp;amp;H3&lt;br /&gt;    CSIDL_PRINTERS = &amp;amp;H4&lt;br /&gt;    CSIDL_PERSONAL = &amp;amp;H5&lt;br /&gt;    CSIDL_FAVORITES = &amp;amp;H6&lt;br /&gt;    CSIDL_STARTUP = &amp;amp;H7&lt;br /&gt;    CSIDL_RECENT = &amp;amp;H8&lt;br /&gt;    CSIDL_SENDTO = &amp;amp;H9&lt;br /&gt;    CSIDL_BITBUCKET = &amp;amp;HA&lt;br /&gt;    CSIDL_STARTMENU = &amp;amp;HB&lt;br /&gt;    CSIDL_DESKTOPDIRECTORY = &amp;amp;H10&lt;br /&gt;    CSIDL_DRIVES = &amp;amp;H11&lt;br /&gt;    CSIDL_NETWORK = &amp;amp;H12&lt;br /&gt;    CSIDL_NETHOOD = &amp;amp;H13&lt;br /&gt;    CSIDL_FONTS = &amp;amp;H14&lt;br /&gt;    CSIDL_TEMPLATES = &amp;amp;H15&lt;br /&gt;    CSIDL_COMMON_STARTMENU = &amp;amp;H16&lt;br /&gt;    CSIDL_COMMON_PROGRAMS = &amp;amp;H17&lt;br /&gt;    CSIDL_COMMON_STARTUP = &amp;amp;H18&lt;br /&gt;    CSIDL_COMMON_DESKTOPDIRECTORY = &amp;amp;H19&lt;br /&gt;    CSIDL_APPDATA = &amp;amp;H1A&lt;br /&gt;    CSIDL_PRINTHOOD = &amp;amp;H1B&lt;br /&gt;    CSIDL_LOCAL_APPDATA = &amp;amp;H1C&lt;br /&gt;    CSIDL_ALTSTARTUP = &amp;amp;H1D&lt;br /&gt;    CSIDL_COMMON_ALTSTARTUP = &amp;amp;H1E&lt;br /&gt;    CSIDL_COMMON_FAVORITES = &amp;amp;H1F&lt;br /&gt;    CSIDL_INTERNET_CACHE = &amp;amp;H20&lt;br /&gt;    CSIDL_COOKIES = &amp;amp;H21&lt;br /&gt;    CSIDL_HISTORY = &amp;amp;H22&lt;br /&gt;    CSIDL_COMMON_APPDATA = &amp;amp;H23&lt;br /&gt;    CSIDL_WINDOWS = &amp;amp;H24&lt;br /&gt;    CSIDL_SYSTEM = &amp;amp;H25&lt;br /&gt;    CSIDL_PROGRAM_FILES = &amp;amp;H26&lt;br /&gt;    CSIDL_MYPICTURES = &amp;amp;H27&lt;br /&gt;    CSIDL_PROFILE = &amp;amp;H28&lt;br /&gt;    CSIDL_SYSTEMX86 = &amp;amp;H29&lt;br /&gt;    CSIDL_PROGRAM_FILESX86 = &amp;amp;H2A&lt;br /&gt;    CSIDL_PROGRAM_FILES_COMMON = &amp;amp;H2B&lt;br /&gt;    CSIDL_PROGRAM_FILES_COMMONX86 = &amp;amp;H2C&lt;br /&gt;    CSIDL_COMMON_TEMPLATES = &amp;amp;H2D&lt;br /&gt;    CSIDL_COMMON_DOCUMENTS = &amp;amp;H2E&lt;br /&gt;    CSIDL_COMMON_ADMINTOOLS = &amp;amp;H2F&lt;br /&gt;    CSIDL_ADMINTOOLS = &amp;amp;H30&lt;br /&gt;    CSIDL_FLAG_CREATE = &amp;amp;H8000&amp;amp;&lt;br /&gt;    CSIDL_FLAG_DONT_VERIFY = &amp;amp;H4000&lt;br /&gt;    CSIDL_FLAG_MASK = &amp;amp;HFF00&lt;br /&gt;End Enum&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Private Declare Function SHGetPathFromIDList Lib "shell32.dll" Alias "SHGetPathFromIDListA" (ByVal pidl As Long, ByVal pszPath As String) As Long&lt;br /&gt;Private Declare Function SHGetSpecialFolderLocation Lib "shell32.dll" (ByVal hwndOwner As Long, ByVal nFolder As Long, pidl As ITEMIDLIST) As Long&lt;br /&gt;&lt;br /&gt;Private Type SHITEMID&lt;br /&gt;    CB As Long&lt;br /&gt;    AbID As Byte&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;Private Type ITEMIDLIST&lt;br /&gt;    Mkid As SHITEMID&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;Public Type SpecialFolder&lt;br /&gt;    FolderPath As String&lt;br /&gt;    FolderType As epPath&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;'Purpose     :  Returns an array of special folders&lt;br /&gt;'Inputs      :&lt;br /&gt;'Outputs     :  Returns an array of the special folders.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function GetAllSpecialFolders() As SpecialFolder()&lt;br /&gt;    Dim lThisFolder As Long, lNumFolders As Long&lt;br /&gt;    Dim sFolderPath As String&lt;br /&gt;    Dim resultArray() As SpecialFolder&lt;br /&gt;   &lt;br /&gt;    Const clMaxFolders As Long = 255&lt;br /&gt;   &lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    Erase resultArray&lt;br /&gt;    'Return All Folders&lt;br /&gt;    ReDim resultArray(1 To clMaxFolders)&lt;br /&gt;    For lThisFolder = 0 To clMaxFolders&lt;br /&gt;        sFolderPath = UCase$(GetSpecialFolder(lThisFolder))&lt;br /&gt;        If Len(sFolderPath) Then&lt;br /&gt;            lNumFolders = lNumFolders + 1&lt;br /&gt;            resultArray(lNumFolders).FolderPath = sFolderPath&lt;br /&gt;            resultArray(lNumFolders).FolderType = lThisFolder&lt;br /&gt;        End If&lt;br /&gt;    Next&lt;br /&gt;   &lt;br /&gt;    If lNumFolders Then&lt;br /&gt;        ReDim Preserve resultArray(1 To lNumFolders)&lt;br /&gt;        GetAllSpecialFolders = resultArray&lt;br /&gt;    Else&lt;br /&gt;        GetAllSpecialFolders = Empty&lt;br /&gt;    End If&lt;br /&gt;   &lt;br /&gt;    Exit Function&lt;br /&gt;ErrFailed:&lt;br /&gt;    GetAllSpecialFolders = Empty&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Function GetSpecialFolder(eFolderID As epPath) As String&lt;br /&gt;    Dim tRetVal As Long, sBuffer As String&lt;br /&gt;    Dim tIDL As ITEMIDLIST&lt;br /&gt;    Const NO_ERROR = 0&lt;br /&gt;   &lt;br /&gt;    'Get the special folder&lt;br /&gt;    tRetVal = SHGetSpecialFolderLocation(100&amp;amp;, eFolderID, tIDL)&lt;br /&gt;    If tRetVal = NO_ERROR Then&lt;br /&gt;        'Create a buffer&lt;br /&gt;        sBuffer = Space$(512)&lt;br /&gt;        'Get the path from the IDList&lt;br /&gt;        tRetVal = SHGetPathFromIDList(ByVal tIDL.Mkid.CB, ByVal sBuffer)&lt;br /&gt;        'Remove the unnecesarry chr$(0)'s&lt;br /&gt;        GetSpecialFolder = Left$(sBuffer, InStr(1, sBuffer, vbNullChar) - 1)&lt;br /&gt;        If Right$(GetSpecialFolder, 1) &lt;&gt; "\" And Len(GetSpecialFolder) &gt; 0 Then&lt;br /&gt;            GetSpecialFolder = GetSpecialFolder &amp;amp; "\"&lt;br /&gt;        End If&lt;br /&gt;    End If&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;'Demonstration routine&lt;br /&gt;Sub Test()&lt;br /&gt;    Dim atFolders() As SpecialFolder, tFolder As SpecialFolder, folder As Integer&lt;br /&gt;    'Get all special folders&lt;br /&gt;    atFolders = GetAllSpecialFolders()&lt;br /&gt;    For folder = 1 To UBound(atFolders)&lt;br /&gt;        tFolder = atFolders(folder)&lt;br /&gt;        Debug.Print "Type: " &amp;amp; tFolder.FolderType &amp;amp; ". Path: " &amp;amp; tFolder.FolderPath&lt;br /&gt;    Next&lt;br /&gt;&lt;br /&gt;    'Get the start menu folder location&lt;br /&gt;    Debug.Print GetSpecialFolder(CSIDL_STARTMENU)&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7147943305151235844?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7147943305151235844/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7147943305151235844' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7147943305151235844'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7147943305151235844'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/determining-system-folder-locations.html' title='Determining the system folder locations'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2874112821318053166</id><published>2009-02-03T07:16:00.000-08:00</published><updated>2009-02-03T07:33:01.231-08:00</updated><title type='text'>Preview an Access Database Report</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;The function below can be used to preview a report created in MS Access.&lt;br /&gt;&lt;br /&gt;'Purpose   :    Preview an Access Report from VB&lt;br /&gt;'Inputs    :    sAccessDBPath           The path and filename of the access database containing the report to show&lt;br /&gt;'               sReportName             The name of the report to show&lt;br /&gt;'Outputs   :    Returns an empty string on success, else returns an error message.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function AccessShowReport(sAccessDBPath As String, sReportName As String) As String&lt;br /&gt;    Dim oAccess As Object 'Access.Application&lt;br /&gt;   &lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    AccessShowReport = ""&lt;br /&gt;    'Create Access&lt;br /&gt;    Set oAccess = CreateObject("Access.Application")&lt;br /&gt;    'Open Database&lt;br /&gt;    oAccess.OpenCurrentDatabase sAccessDBPath&lt;br /&gt;    'Open report&lt;br /&gt;    oAccess.DoCmd.OpenReport sReportName, 0 'acViewNormal&lt;br /&gt;    'Show Access Report&lt;br /&gt;    oAccess.Visible = True&lt;br /&gt;    oAccess.CloseCurrentDatabase&lt;br /&gt;    Set oAccess = Nothing&lt;br /&gt;    Exit Function&lt;br /&gt;&lt;br /&gt;ErrFailed:&lt;br /&gt;    Debug.Print Err.Description&lt;br /&gt;    Debug.Assert False&lt;br /&gt;    AccessShowReport = Err.Description&lt;br /&gt;    If oAccess Is Nothing = False Then&lt;br /&gt;        oAccess.CloseCurrentDatabase&lt;br /&gt;        Set oAccess = Nothing&lt;br /&gt;    End If&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2874112821318053166?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2874112821318053166/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2874112821318053166' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2874112821318053166'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2874112821318053166'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/preview-access-database-report.html' title='Preview an Access Database Report'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-9193930889828955205</id><published>2009-02-03T07:07:00.000-08:00</published><updated>2009-02-03T07:15:09.105-08:00</updated><title type='text'>Repoint an Access Link table using ADO-ADOX</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;The following routine repoints a link table to a different database.&lt;br /&gt;&lt;br /&gt;'Purpose     :  Updates the underlying source of a link table in an Access database&lt;br /&gt;'Inputs      :  sLinkDatabasePath path to the database.&lt;br /&gt;'               sLinkToNewDatabase The path to the database repoint the link to.&lt;br /&gt;'               sLinkTableName name of the link table to repoint.&lt;br /&gt;'Outputs     :  Returns True if succeeded in repointing the table&lt;br /&gt;'Notes       :  Requires a reference to reference to both ADO (MS ActiveX Data Objects) and MSADOX.DLL&lt;br /&gt;'               (MS ADO Ext. 2.5 DLL and Security).&lt;br /&gt;'Revisions   :&lt;br /&gt;&lt;br /&gt;Function AccessLinkTableUpdate(sLinkDatabasePath As String, sLinkToNewDatabase As String, sLinkTableName As String) As Boolean&lt;br /&gt;&lt;br /&gt;Dim catDB As ADOX.Catalog&lt;br /&gt;   &lt;br /&gt; On Error GoTo ErrFailed&lt;br /&gt; Set catDB = New ADOX.Catalog&lt;br /&gt;    'Open a catalog on the database which contains the table to refresh.&lt;br /&gt;.ActiveConnection = "Provider=Microsoft.Jet.OLEDB.4.0;" &amp;amp; "Data Source=" &amp;amp; sLinkDatabasePath&lt;br /&gt; catDB.Tables(sLinkTableName).Type = "LINK" Then&lt;br /&gt;.Tables(sLinkTableName).Properties("Jet OLEDB:Link Datasource") = sLinkToNewDatabase&lt;br /&gt;AccessLinkTableUpdate = True&lt;br /&gt;    End If&lt;br /&gt;    Set catDB = Nothing&lt;br /&gt;    Exit Function&lt;br /&gt;&lt;br /&gt;ErrFailed:&lt;br /&gt;    On Error GoTo 0&lt;br /&gt;    AccessLinkTableUpdate = False&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-9193930889828955205?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/9193930889828955205/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=9193930889828955205' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/9193930889828955205'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/9193930889828955205'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/repoint-access-link-table-using-ado.html' title='Repoint an Access Link table using ADO-ADOX'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-8835093748265477701</id><published>2009-02-03T07:03:00.000-08:00</published><updated>2009-02-03T07:05:42.582-08:00</updated><title type='text'>Read data from a workbook using ADO</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;&lt;span style="font-family: verdana; font-weight: bold;"&gt;The following code reads data from closed Excel workbooks using ADO with an ODBC driver.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Purpose     :  Extracts data from a closed workbook to an array&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Inputs      :  sSourceFile                     The path and file name of the workbook to read data from.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;               sRange                          The range reference (or named range) to read the data from.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;               [sSheetName]                    The name of the sheet to return the data from. If not specified returns&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;                                               data from first sheet.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;               [bReturnHeadings]               If True returns the Column Headings (i.e. the first row in the range).&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;                                               Note: This alters the shape of the output array to an array in an array.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Outputs     :  Returns a 2d variant array containing the values in the specified range.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Notes       :  Requires a reference to the Microsoft ActiveX Data Objects library&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;Could also use OLEDB JET 4.0 Driver &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;"Provider=Microsoft.Jet.OLEDB.4.0;Data Source=" &amp;amp; sSourceFile &amp;amp; ";Extended Properties=""Excel 8.0;HDR=Yes"""&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function WorkbookReadRange(sSourceFile As String, sRange As String, Optional sSheetName As String, Optional bReturnHeadings As Boolean) As Variant&lt;br /&gt;    Dim conWkb As ADODB.Connection, rsWkbCells As ADODB.Recordset, sConString As String&lt;br /&gt;    Dim lThisField As Long, avResults As Variant, avHeadings As Variant&lt;br /&gt;   &lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    sConString = "DRIVER={Microsoft Excel Driver (*.xls)};ReadOnly=1;DBQ=" &amp;amp; sSourceFile&lt;br /&gt;    Set conWkb = New ADODB.Connection&lt;br /&gt;    'open connection&lt;br /&gt;    conWkb.Open sConString&lt;br /&gt;    If Len(sSheetName) Then&lt;br /&gt;        'Get data from specified sheet&lt;br /&gt;        Set rsWkbCells = conWkb.Execute("Select * from " &amp;amp; Chr(34) &amp;amp; sSheetName &amp;amp; "$" &amp;amp; sRange &amp;amp; Chr$(34))&lt;br /&gt;    Else&lt;br /&gt;        'Get data from first sheet&lt;br /&gt;        Set rsWkbCells = conWkb.Execute("Select * from " &amp;amp; sRange)&lt;br /&gt;    End If&lt;br /&gt;    If rsWkbCells.EOF Then&lt;br /&gt;        'Return a 1d array&lt;br /&gt;        'Get headings&lt;br /&gt;        ReDim avHeadings(0 To 0, 0 To rsWkbCells.Fields.Count - 1)&lt;br /&gt;        For lThisField = 0 To rsWkbCells.Fields.Count - 1&lt;br /&gt;            avHeadings(0, lThisField) = rsWkbCells.Fields(lThisField).Name&lt;br /&gt;        Next&lt;br /&gt;        WorkbookReadRange = avHeadings&lt;br /&gt;    Else&lt;br /&gt;        'Return a 2d array&lt;br /&gt;        If bReturnHeadings Then&lt;br /&gt;            'Get cells&lt;br /&gt;            avResults = rsWkbCells.GetRows&lt;br /&gt;            'Get headings&lt;br /&gt;            ReDim avHeadings(0 To rsWkbCells.Fields.Count - 1, 0 To 0)&lt;br /&gt;            For lThisField = 0 To rsWkbCells.Fields.Count - 1&lt;br /&gt;                avHeadings(lThisField, 0) = rsWkbCells.Fields(lThisField).Name&lt;br /&gt;            Next&lt;br /&gt;            WorkbookReadRange = Array(avHeadings, avResults)&lt;br /&gt;        Else&lt;br /&gt;            'Get cells&lt;br /&gt;            WorkbookReadRange = rsWkbCells.GetRows&lt;br /&gt;        End If&lt;br /&gt;    End If&lt;br /&gt;    'Disconnect and destroy DB objects&lt;br /&gt;    rsWkbCells.Close&lt;br /&gt;    conWkb.Close&lt;br /&gt;    Set rsWkbCells = Nothing&lt;br /&gt;    Set conWkb = Nothing&lt;br /&gt;    On Error GoTo 0&lt;br /&gt;    Exit Function&lt;br /&gt;&lt;br /&gt;ErrFailed:&lt;br /&gt;   'Return error message&lt;br /&gt;    WorkbookReadRange = Err.Description&lt;br /&gt;&lt;br /&gt;    If conWkb.State &lt;&gt; adStateClosed Then&lt;br /&gt;        conWkb.Close&lt;br /&gt;    End If&lt;br /&gt;  &lt;br /&gt;    Set rsWkbCells = Nothing&lt;br /&gt;    Set conWkb = Nothing&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;'Demonstration Routine&lt;br /&gt;Sub Test()&lt;br /&gt;    Dim avCellValues As Variant, vThisCell As Variant&lt;br /&gt;    avCellValues = WorkbookReadRange("C:\book1.xls", "A1:B2", "Sheet1")&lt;br /&gt;    If IsArray(avCellValues) Then&lt;br /&gt;        For Each vThisCell In avCellValues&lt;br /&gt;            Debug.Print vThisCell&lt;br /&gt;        Next&lt;br /&gt;    End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-8835093748265477701?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/8835093748265477701/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=8835093748265477701' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8835093748265477701'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/8835093748265477701'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/read-data-from-workbook-using-ado.html' title='Read data from a workbook using ADO'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7310819550222592545</id><published>2009-02-03T06:59:00.000-08:00</published><updated>2009-02-03T07:01:28.281-08:00</updated><title type='text'>Return table names from Access-SQL Server</title><content type='html'>&lt;div style="text-align: justify; font-family: verdana;"&gt;&lt;span style="font-weight: bold;"&gt;The function below uses ADOX (Microsoft ADO Ext 2.5 for DLL and Security) to&lt;/span&gt; &lt;span style="font-weight: bold;"&gt;return all the table names for a given connection or connection string.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Purpose   :    Returns all the tables in an Access or SQL Server database&lt;br /&gt;Inputs    :     A valid connection string or ADO Connection&lt;br /&gt;Outputs   :    A collection of Table Names&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight: bold;"&gt;CODE : &lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Public Function TableNames(Optional sConnectionString As String, Optional cCN As ADODB.Connection) As Collection&lt;br /&gt;    Dim oCatalog As New ADOX.Catalog, colTableNames As New Collection&lt;br /&gt;    Dim oTables As ADOX.Tables, oTable As ADOX.Table&lt;br /&gt;    Dim oConnection As New ADODB.Connection&lt;br /&gt;   &lt;br /&gt;    On Error GoTo ExitSub&lt;br /&gt;    If Len(sConnectionString) Then&lt;br /&gt;        oConnection.ConnectionString = sConnectionString&lt;br /&gt;        oConnection.Open sConnectionString&lt;br /&gt;    Else&lt;br /&gt;        Set oConnection = cCN&lt;br /&gt;    End If&lt;br /&gt;    Set oCatalog.ActiveConnection = oConnection&lt;br /&gt;    Set oTables = oCatalog.Tables&lt;br /&gt;   &lt;br /&gt;    For Each oTable In oTables&lt;br /&gt;        colTableNames.Add oTable.Name&lt;br /&gt;    Next&lt;br /&gt;    Set TableNames = colTableNames&lt;br /&gt;&lt;br /&gt;ExitSub:&lt;br /&gt;    On Error Resume Next&lt;br /&gt;    If Len(sConnectionString) Then&lt;br /&gt;        'Close Temporary Connection&lt;br /&gt;        If oConnection.State &lt;&gt; 0 Then&lt;br /&gt;            oConnection.Close&lt;br /&gt;        End If&lt;br /&gt;    End If&lt;br /&gt;    Set oConnection = Nothing&lt;br /&gt;    Set oCatalog = Nothing&lt;br /&gt;    Set oTable = Nothing&lt;br /&gt;    Set oTables = Nothing&lt;br /&gt;    Exit Function&lt;br /&gt;ErrFailed:&lt;br /&gt;    Debug.Print Err.Description&lt;br /&gt;    Debug.Assert False&lt;br /&gt;    Resume ExitSub&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Example&lt;br /&gt;Private Sub Form_Load()&lt;br /&gt;    Dim colTableNames As Collection, vTable As Variant&lt;br /&gt;    Set colTableNames = TableNames("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Inetpub\GFX-IT\database\support.mdb; Persist Security Info=False")&lt;br /&gt;    For Each vTable In colTableNames&lt;br /&gt;        Debug.Print "Table Name: " &amp;amp; vTable&lt;br /&gt;    Next&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7310819550222592545?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7310819550222592545/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7310819550222592545' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7310819550222592545'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7310819550222592545'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/return-table-names-from-access-sql.html' title='Return table names from Access-SQL Server'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1432880513670473128</id><published>2009-02-03T06:54:00.000-08:00</published><updated>2009-02-03T06:58:09.574-08:00</updated><title type='text'>Retrieve a list of the users logged on to an Access-Jet Database</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Option Explicit&lt;br /&gt;&lt;br /&gt;'----------Type to hold results------------&lt;br /&gt;'For each person who opens a shared database, the Jet database engine writes an entry&lt;br /&gt;'in the database's .ldb file. The size of each .ldb entry is 64 bytes. The first 32&lt;br /&gt;'bytes contains the computer name. The second 32 bytes contains the&lt;br /&gt;'security name (such as Admin).&lt;br /&gt;Private Type tDBUser&lt;br /&gt;    UserName As String * 32&lt;br /&gt;    SecurityName As String * 32&lt;br /&gt;End Type&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Purpose     :  Retreives a list of users attached to an Access Database by parsing the ldb file&lt;br /&gt;'Inputs      :  asUsers                         See outputs&lt;br /&gt;'               sLDBFilePath                    The path and file name of the ldb file&lt;br /&gt;'Outputs     :  asUsers                         A 2d string array 1 to 2, 1 to Number of users&lt;br /&gt;'                                               Where   asUsers(1,1)      =       First user name&lt;br /&gt;'                                                       asUsers(2,1)      =       User's security access&lt;br /&gt;'               Returns 0 if their are no users or the lock file doesn't exist.&lt;br /&gt;'               Returns -1 on error.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function DatabaseUsers(ByRef asUsers() As String, sLDBFilePath As String) As Long&lt;br /&gt;    Const clMaxUsers As Long = 255      'The maximum number of concurrent users that the Jet database engine supports is 255&lt;br /&gt;    Dim iFileNum As Integer&lt;br /&gt;    Dim tThisUser As tDBUser&lt;br /&gt;   &lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    If Len(Dir$(sLDBFilePath)) &gt; 0 And Len(sLDBFilePath) &gt; 0 Then&lt;br /&gt;        'Lock file exists, open file.&lt;br /&gt;        iFileNum = FreeFile&lt;br /&gt;        Open sLDBFilePath For Random As #iFileNum Len = Len(tThisUser)&lt;br /&gt;        'Create buffer to store results&lt;br /&gt;        ReDim asUsers(1 To 2, 1 To clMaxUsers)&lt;br /&gt;        'Read data into fixed length type&lt;br /&gt;        Get iFileNum, 1, tThisUser&lt;br /&gt;        Do While Not EOF(iFileNum)&lt;br /&gt;            DatabaseUsers = DatabaseUsers + 1&lt;br /&gt;            asUsers(1, DatabaseUsers) = Left$(tThisUser.UserName, InStr(1, tThisUser.UserName, vbNullChar) - 1)&lt;br /&gt;            asUsers(2, DatabaseUsers) = Left$(tThisUser.SecurityName, InStr(1, tThisUser.SecurityName, vbNullChar) - 1)&lt;br /&gt;            'Read next record&lt;br /&gt;            Get iFileNum, DatabaseUsers + 1, tThisUser&lt;br /&gt;        Loop&lt;br /&gt;        'Close file&lt;br /&gt;        Close #iFileNum&lt;br /&gt;        'Resize results&lt;br /&gt;        ReDim Preserve asUsers(1 To 2, 1 To DatabaseUsers)&lt;br /&gt;    Else&lt;br /&gt;        'No users attached&lt;br /&gt;        Erase asUsers&lt;br /&gt;    End If&lt;br /&gt;    Exit Function&lt;br /&gt;ErrFailed:&lt;br /&gt;    DatabaseUsers = -1&lt;br /&gt;    Erase asUsers&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;'Demonstration routine&lt;br /&gt;Sub Test()&lt;br /&gt;    Dim asUsers() As String, lNumUsers As Long, lThisUser As Long&lt;br /&gt;&lt;br /&gt;    lNumUsers = DatabaseUsers(asUsers, "D:\Work\Visual Basic\Net Send\NetSend.ldb")&lt;br /&gt;    For lThisUser = 1 To lNumUsers&lt;br /&gt;        Debug.Print "User Name: " &amp;amp; asUsers(1, lThisUser)&lt;br /&gt;        Debug.Print "Security : " &amp;amp; asUsers(2, lThisUser)&lt;br /&gt;    Next&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1432880513670473128?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1432880513670473128/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1432880513670473128' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1432880513670473128'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1432880513670473128'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/retrieve-list-of-users-logged-on-to.html' title='Retrieve a list of the users logged on to an Access-Jet Database'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2215938123736312766</id><published>2009-02-03T06:49:00.000-08:00</published><updated>2009-02-03T06:53:08.272-08:00</updated><title type='text'>Returning an asynchronous client side recorset with ADO</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;The following function below illustrates how you would run an ADO client side (disconnected) query asynchronously:&lt;br /&gt;&lt;br /&gt;Private Declare Sub Sleep Lib "kernel32" Alias "Sleep" (ByVal dwMilliseconds As Long)&lt;br /&gt;&lt;br /&gt;'Purpose     :  Executes a disconnect ADO query asynchronously.&lt;br /&gt;'Inputs      :  sSql                            The SQL to execute.&lt;br /&gt;'               oCon                            The connection to execute against.&lt;br /&gt;'               [lQueryTimeout]                 If specified is the amount of time to wait (in secs) before aborting the query&lt;br /&gt;'Outputs     :  Returns a recordset contain the results of the query&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function RecordsetOpenAsync(sSql As String, oCon As ADODB.Connection, Optional lQueryTimeout As Long = -1) As ADODB.Recordset&lt;br /&gt;    Dim oRs As ADODB.Recordset, lQueryTimeoutOld As Long&lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;   &lt;br /&gt;    'Create recordset&lt;br /&gt;    Set oRs = New Recordset&lt;br /&gt;   &lt;br /&gt;    If lQueryTimeout &lt;&gt; -1 Then&lt;br /&gt;        'Store and set query timeout&lt;br /&gt;        lQueryTimeoutOld = oCon.CommandTimeout&lt;br /&gt;        oCon.CommandTimeout = lQueryTimeout&lt;br /&gt;    End If&lt;br /&gt;   &lt;br /&gt;    'Set cursor to client&lt;br /&gt;    oRs.CursorLocation = adUseClient&lt;br /&gt;   &lt;br /&gt;    'Open recorset&lt;br /&gt;    'Using the "adAsyncExecute" option means the query returns immediately. If you&lt;br /&gt;    'use the "adAsync" option the query will return after "Initial Fetch Size" rows have been&lt;br /&gt;    'returned (see oRs.Properties("Initial Fetch Size") + oRs.Properties("Background Fetch Size"))&lt;br /&gt;    oRs.Open sSql, oCon, adOpenStatic, adLockBatchOptimistic, adAsyncExecute&lt;br /&gt;   &lt;br /&gt;    'Wait for recordset to finish fetching&lt;br /&gt;    Do While oRs.state &lt;&gt; adStateOpen&lt;br /&gt;        Sleep 20&lt;br /&gt;        DoEvents&lt;br /&gt;    Loop&lt;br /&gt;   &lt;br /&gt;    'Disconnect recordset&lt;br /&gt;    If oRs.EOF = False Then&lt;br /&gt;        'Results are pending. Move the cursor across the results to fetch them (onto the client)&lt;br /&gt;        oRs.MoveLast&lt;br /&gt;        oRs.MoveFirst&lt;br /&gt;    End If&lt;br /&gt;    'Release reference to connection&lt;br /&gt;    Set oRs.ActiveConnection = Nothing&lt;br /&gt;   &lt;br /&gt;    If lQueryTimeout &lt;&gt; -1 Then&lt;br /&gt;        'Restore query timeout&lt;br /&gt;        oCon.CommandTimeout = lQueryTimeoutOld&lt;br /&gt;    End If&lt;br /&gt;   &lt;br /&gt;    'Return recordset&lt;br /&gt;    Set RecordsetOpenAsync = oRs&lt;br /&gt;   &lt;br /&gt;    Exit Function&lt;br /&gt;   &lt;br /&gt;ErrFailed:&lt;br /&gt;    'Error occured&lt;br /&gt;    Debug.Print Err.Description&lt;br /&gt;    Debug.Assert False&lt;br /&gt;    Set RecordsetOpenAsync = Nothing&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-2215938123736312766?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/2215938123736312766/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=2215938123736312766' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2215938123736312766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/2215938123736312766'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/returning-asynchronous-client-side.html' title='Returning an asynchronous client side recorset with ADO'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3498562871114263447</id><published>2009-02-03T06:45:00.000-08:00</published><updated>2009-02-03T06:49:03.206-08:00</updated><title type='text'>Updating a database using a disconnected recordset</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Option Explicit&lt;br /&gt;&lt;br /&gt;'Purpose     :  Open a disconnected recordset.&lt;br /&gt;'Inputs      :  oCon                        The connection to open the recordset on.&lt;br /&gt;'               sSQL                        The SQL to open the recordset with.&lt;br /&gt;'               oRS                         The resulting recordset.&lt;br /&gt;'Outputs     :  Returns True if the recordset was opened and contained results.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Public Function RSOpenDisconnected(oCon As ADODB.Connection, sSQL As String, oRS As ADODB.Recordset, Optional eLocking As LockTypeEnum = adLockBatchOptimistic) As Boolean&lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    If oCon.State = adStateOpen Then&lt;br /&gt;        'Connection is open&lt;br /&gt;        Set oRS = New ADODB.Recordset&lt;br /&gt;        'Set cursor to client (i.e. Local Machine)&lt;br /&gt;        oRS.CursorLocation = adUseClient&lt;br /&gt;        'Open Recordset (NB. The CursorType is always "adOpenStatic" for client-side cursors)&lt;br /&gt;        oRS.Open sSQL, oCon, adOpenStatic, eLocking&lt;br /&gt;        'Set connection to nothing (disconnect recordset)&lt;br /&gt;        Set oRS.ActiveConnection = Nothing&lt;br /&gt;        If oRS.EOF = False Then&lt;br /&gt;            'Return results&lt;br /&gt;            RSOpenDisconnected = True&lt;br /&gt;        Else&lt;br /&gt;            'Empty recorset&lt;br /&gt;            RSOpenDisconnected = False&lt;br /&gt;        End If&lt;br /&gt;    End If&lt;br /&gt;    Exit Function&lt;br /&gt;&lt;br /&gt;ErrFailed:&lt;br /&gt;    Debug.Print "Failed to open recordset: " &amp;amp; Err.Description&lt;br /&gt;    Debug.Assert False  'Error occurred&lt;br /&gt;    RSOpenDisconnected = False&lt;br /&gt;    On Error GoTo 0&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Demonstrates how to open a disconnected recordset and then update a value in&lt;br /&gt;'a field in the database.&lt;br /&gt;Sub Test()&lt;br /&gt;    Dim oRS As ADODB.Recordset&lt;br /&gt;    Dim oConn As ADODB.Connection&lt;br /&gt;    Const clRecordUpdated As Long = -2147217864&lt;br /&gt;   &lt;br /&gt;    On Error GoTo ErrUpdateFailed&lt;br /&gt;    'Open a connection to a database&lt;br /&gt;    Set oConn = New ADODB.Connection&lt;br /&gt;    oConn.Open "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\MyPath\MyDatabase.mdb; Persist Security Info=False"&lt;br /&gt;    'Open a disconnected recordset&lt;br /&gt;    RSOpenDisconnected oConn, "Select * from tblHoliday", oRS&lt;br /&gt;    'Update a field in the recordset&lt;br /&gt;    oRS.Fields("MyField").Value = "My New Value"&lt;br /&gt;    'Reconnect to database&lt;br /&gt;    Set oRS.ActiveConnection = oConn&lt;br /&gt;   &lt;br /&gt;    'Update table&lt;br /&gt;    oRS.UpdateBatch&lt;br /&gt;   &lt;br /&gt;    'Close the connection&lt;br /&gt;    oRS.Close&lt;br /&gt;    Set oRS = Nothing&lt;br /&gt;    oConn.Close&lt;br /&gt;    Set oConn = Nothing&lt;br /&gt;   &lt;br /&gt;    Exit Sub&lt;br /&gt;   &lt;br /&gt;ErrUpdateFailed:&lt;br /&gt;    If Err.Number = clRecordUpdated Then&lt;br /&gt;        MsgBox "The record you altered has been altered by another user... " &amp;amp; vbNewLine &amp;amp; Err.Description, vbCritical&lt;br /&gt;    Else&lt;br /&gt;        MsgBox "Error in disconnected update routine... " &amp;amp; vbNewLine &amp;amp; Err.Description, vbCritical&lt;br /&gt;    End If&lt;br /&gt;End Sub&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3498562871114263447?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3498562871114263447/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3498562871114263447' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3498562871114263447'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3498562871114263447'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/02/updating-database-using-disconnected.html' title='Updating a database using a disconnected recordset'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-7761548258710159375</id><published>2009-01-30T22:52:00.000-08:00</published><updated>2009-01-30T22:57:27.480-08:00</updated><title type='text'>Adding a horizontal scroll bar to a listbox</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Option Explicit&lt;br /&gt;&lt;br /&gt;Private Declare Function SendMessageA Lib "user32" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Purpose     :  Adds items to a listbox and if neccessary sets the&lt;br /&gt;'               width of the horizontal scroll bar to the maximum width of the&lt;br /&gt;'               items in the listbox.&lt;br /&gt;'Inputs      :  lbListbox                   The listbox to add the item to.&lt;br /&gt;'               sItemText                   The text to add to the listbox.&lt;br /&gt;'               [iIndex]                    The position within the object where the new item or row is placed.&lt;br /&gt;'Outputs     :  Returns True on success&lt;br /&gt;'Notes       :&lt;br /&gt;'Revisions   :&lt;br /&gt;'Assumptions : &lt;br /&gt;&lt;br /&gt;Function ListboxAddItem(lbListbox As ListBox, sItemText As String, Optional iIndex As Integer = -1) as Boolean&lt;br /&gt;    Dim fTextWidth As Single, fExistScrollWidth As Single&lt;br /&gt;    Dim oParentFont As StdFont&lt;br /&gt;    Const LB_SETHORIZONTALEXTENT = &amp;amp;H194, LB_GETHORIZONTALEXTENT = &amp;amp;H193&lt;br /&gt;&lt;br /&gt;    On Error Resume Next&lt;br /&gt;&lt;br /&gt;    'Add item to listbox&lt;br /&gt;    If iIndex &gt; -1 Then&lt;br /&gt;        lbListbox.AddItem sItemText, iIndex&lt;br /&gt;    Else&lt;br /&gt;        lbListbox.AddItem sItemText&lt;br /&gt;    End If&lt;br /&gt;&lt;br /&gt;    'Store the form's original font&lt;br /&gt;    Set oParentFont = lbListbox.Parent.Font&lt;br /&gt;    'Set the form's font to the listbox's font&lt;br /&gt;    Set lbListbox.Parent.Font = lbListbox.Font&lt;br /&gt;    'Get width of text on the form&lt;br /&gt;    fTextWidth = lbListbox.Parent.TextWidth(sItemText &amp;amp; " ")        'Extra space allows for vertical scroll bar&lt;br /&gt;    'Restore the form's font&lt;br /&gt;    Set lbListbox.Parent.Font = oParentFont&lt;br /&gt;   &lt;br /&gt;    'Get the width of the existing scroll bar&lt;br /&gt;    fExistScrollWidth = SendMessageA(lbListbox.hwnd, LB_GETHORIZONTALEXTENT, 0, 0)&lt;br /&gt;   &lt;br /&gt;    If lbListbox.Parent.ScaleMode = vbTwips Then&lt;br /&gt;        'Change twips to pixels&lt;br /&gt;        fTextWidth = fTextWidth / Screen.TwipsPerPixelX&lt;br /&gt;    End If&lt;br /&gt;   &lt;br /&gt;    If fTextWidth &gt; fExistScrollWidth Then&lt;br /&gt;        'Increase width of scroll bar&lt;br /&gt;        Call SendMessageA(lbListbox.hwnd, LB_SETHORIZONTALEXTENT, fTextWidth, 0)&lt;br /&gt;    End If&lt;br /&gt;    ListboxAddItem = (Err.Number = 0)&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Purpose     :  Modifies the text of an item in a listbox and if neccessary sets the&lt;br /&gt;'               width of the horizontal scroll bar to the maximum width of the&lt;br /&gt;'               items in the listbox.&lt;br /&gt;'Inputs      :  lbListbox                   The listbox to update the item in.&lt;br /&gt;'               sNewItemText                The new text for the item in the listbox.&lt;br /&gt;'               [iIndex]                    The index of the item to update within the listbox.&lt;br /&gt;'Outputs     :  Returns True on Success&lt;br /&gt;'Notes       :&lt;br /&gt;'Revisions   :&lt;br /&gt;'Assumptions :&lt;br /&gt;&lt;br /&gt;Function ListboxUpdateItem(lbListbox As ListBox, sNewItemText As String, iIndex As Integer) As Boolean&lt;br /&gt;    Dim fTextWidth As Single, fExistScrollWidth As Single&lt;br /&gt;    Dim oParentFont As StdFont&lt;br /&gt;    Const LB_SETHORIZONTALEXTENT = &amp;amp;H194, LB_GETHORIZONTALEXTENT = &amp;amp;H193&lt;br /&gt;   &lt;br /&gt;    'Add item to listbox&lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    If lbListbox.List(iIndex) &lt;&gt; sNewItemText Then&lt;br /&gt;        lbListbox.List(iIndex) = sNewItemText&lt;br /&gt;        'Get width of text&lt;br /&gt;        Set oParentFont = lbListbox.Parent.Font&lt;br /&gt;        Set lbListbox.Parent.Font = lbListbox.Font&lt;br /&gt;        fTextWidth = lbListbox.Parent.TextWidth(sNewItemText &amp;amp; " ")        'Extra space allows for vertical scroll bar&lt;br /&gt;        Set lbListbox.Parent.Font = oParentFont&lt;br /&gt;        fExistScrollWidth = SendMessageA(lbListbox.hwnd, LB_GETHORIZONTALEXTENT, 0, 0)&lt;br /&gt;       &lt;br /&gt;        If lbListbox.Parent.ScaleMode = vbTwips Then&lt;br /&gt;            'Change twips to pixels&lt;br /&gt;            fTextWidth = fTextWidth / Screen.TwipsPerPixelX&lt;br /&gt;        End If&lt;br /&gt;       &lt;br /&gt;        If fTextWidth &gt; fExistScrollWidth Then&lt;br /&gt;            'Increase width of scroll bar&lt;br /&gt;            Call SendMessageA(lbListbox.hwnd, LB_SETHORIZONTALEXTENT, fTextWidth, 0)&lt;br /&gt;        End If&lt;br /&gt;    End If&lt;br /&gt;    ListboxUpdateItem = True&lt;br /&gt;&lt;br /&gt;    Exit Function&lt;br /&gt;   &lt;br /&gt;ErrFailed:&lt;br /&gt;    Debug.Print "Error in ListboxAddItem: " &amp;amp; lbListbox.Name &amp;amp; " Description: " &amp;amp; Err.Description&lt;br /&gt;    ListboxUpdateItem = False&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;'Purpose     :  Adds a horizontal scroll bar to a listbox&lt;br /&gt;'Inputs      :  lbListbox                   The listbox to add the scrollbar to.&lt;br /&gt;'Outputs     :  Returns True on success&lt;br /&gt;'Notes       :&lt;br /&gt;'Revisions   :&lt;br /&gt;'Assumptions :&lt;br /&gt;&lt;br /&gt;Function ListboxAddHorizontalScollBar(lbListbox As ListBox) As Boolean&lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    Dim fTextWidth As Single&lt;br /&gt;    Dim oParentFont As StdFont, fExistScrollWidth As Single&lt;br /&gt;    Dim lThisListItem As Long, fMaxScollWidth As Single, lMaxTextLen As Long&lt;br /&gt;    Const LB_SETHORIZONTALEXTENT = &amp;amp;H194, LB_GETHORIZONTALEXTENT = &amp;amp;H193&lt;br /&gt;&lt;br /&gt;    'Add item to listbox&lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    'Set the parent font&lt;br /&gt;    Set oParentFont = lbListbox.Parent.font&lt;br /&gt;    Set lbListbox.Parent.font = lbListbox.font&lt;br /&gt;    Set lbListbox.Parent.font = oParentFont&lt;br /&gt;&lt;br /&gt;    'Determine max. length of text&lt;br /&gt;    For lThisListItem = 0 To lbListbox.ListCount - 1&lt;br /&gt;        If Len(lbListbox.list(lThisListItem)) &gt; lMaxTextLen Then&lt;br /&gt;            lMaxTextLen = Len(lbListbox.list(lThisListItem))&lt;br /&gt;        End If&lt;br /&gt;    Next&lt;br /&gt;&lt;br /&gt;    'Get the text length&lt;br /&gt;    fTextWidth = lbListbox.Parent.TextWidth(String(lMaxTextLen + 1, "W"))       'Extra space allows for vertical scroll bar&lt;br /&gt;    'Restore the form's font&lt;br /&gt;    Set lbListbox.Parent.font = oParentFont&lt;br /&gt;&lt;br /&gt;    'Get the width of the existing scroll bar&lt;br /&gt;    fExistScrollWidth = SendMessage(lbListbox.hwnd, LB_GETHORIZONTALEXTENT, 0, 0)&lt;br /&gt;&lt;br /&gt;    If lbListbox.Parent.ScaleMode = vbTwips Then&lt;br /&gt;        'Change twips to pixels&lt;br /&gt;        fTextWidth = fTextWidth / Screen.TwipsPerPixelX&lt;br /&gt;    End If&lt;br /&gt;&lt;br /&gt;    If fTextWidth &gt; fExistScrollWidth Then&lt;br /&gt;        'Increase width of scroll bar&lt;br /&gt;        Call SendMessage(lbListbox.hwnd, LB_SETHORIZONTALEXTENT, fTextWidth, 0)&lt;br /&gt;    End If&lt;br /&gt;    ListboxAddHorizontalScollBar = (err.number = 0)&lt;br /&gt;   &lt;br /&gt;    Exit Function&lt;br /&gt;&lt;br /&gt;ErrFailed:&lt;br /&gt;    Debug.Print err.description&lt;br /&gt;    Debug.Assert False&lt;br /&gt;    ListboxAddHorizontalScollBar = (err.number = 0)&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-7761548258710159375?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/7761548258710159375/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=7761548258710159375' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7761548258710159375'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/7761548258710159375'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/adding-horizontal-scroll-bar-to-listbox.html' title='Adding a horizontal scroll bar to a listbox'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1190106347530189788</id><published>2009-01-30T22:49:00.000-08:00</published><updated>2009-01-30T22:51:37.212-08:00</updated><title type='text'>Calling ODBC from ADO to connect to thirdparty driver</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Dim ADOCN As New ADODB.Connection&lt;br /&gt;Dim ADORS As New ADODB.Recordset&lt;br /&gt;Dim mysql  As String&lt;br /&gt;With ADOCN&lt;br /&gt;'here how to call odbc from ADO!&lt;br /&gt;   .ConnectionString = "DSN=odbc namet;UID=YOURUSERID;PWD=YOURPASSWORD;"&lt;br /&gt;.Mode = adModeReadOnly&lt;br /&gt;   .Open&lt;br /&gt;End With&lt;br /&gt;&lt;br /&gt;With ADORS&lt;br /&gt;   .CursorLocation = adUseClient&lt;br /&gt;   .CursorType = adOpenKeyset&lt;br /&gt;   .LockType = adLockOptimistic&lt;br /&gt;   .ActiveConnection = ADOCN&lt;br /&gt;    mysql = "select whatever from my table"&lt;br /&gt;   .Source = mysql&lt;br /&gt;   .Open&lt;br /&gt;'for good preformance, I did store the record set in variant type variable so I can disconnect from host sooner&lt;br /&gt;&lt;br /&gt;.ctiveConnection = Nothing&lt;br /&gt;    myrows = .RecordCount&lt;br /&gt;    mycola = .Fields.Count&lt;br /&gt;    mydata = .GetRows()&lt;br /&gt;&lt;br /&gt;'now I can loop through my result&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1190106347530189788?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1190106347530189788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1190106347530189788' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1190106347530189788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1190106347530189788'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/calling-odbc-from-ado-to-connect-to.html' title='Calling ODBC from ADO to connect to thirdparty driver'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-3665043713992582224</id><published>2009-01-30T22:41:00.000-08:00</published><updated>2009-01-30T22:48:29.839-08:00</updated><title type='text'>Sending Crystal Reports to MAPI</title><content type='html'>&lt;div style="text-align: justify; font-family: verdana;"&gt;Dim App as New craxdrt.Application&lt;br /&gt;Dim rpt as craxdrt.Report&lt;br /&gt;&lt;br /&gt;Set rpt = App.OpenReport("\\cms_live\Reports\Report Maker&lt;br /&gt;2k1\Admin\ImpBuddyProfile.RPT")&lt;br /&gt;&lt;br /&gt;   With rpt.ExportOptions&lt;br /&gt;                .DestinationType = crEDTEMailMAPI&lt;br /&gt;                .FormatType = crEFTPortableDocFormat&lt;br /&gt;&lt;br /&gt;                .MailToList = "steve"&lt;br /&gt;&lt;br /&gt;                .MailSubject = "Mail Subject"&lt;br /&gt;                .MailMessage = strMessage&lt;br /&gt;            End With&lt;br /&gt;&lt;br /&gt;            With rpt&lt;br /&gt;                .DisplayProgressDialog = False&lt;br /&gt;                .EnableParameterPrompting = False&lt;br /&gt;                .ParameterFields(1).AddCurrentValue "Any Old Value"&lt;br /&gt;                .Export False&lt;br /&gt;            End With&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-3665043713992582224?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/3665043713992582224/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=3665043713992582224' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3665043713992582224'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/3665043713992582224'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/sending-crystal-reports-to-mapi.html' title='Sending Crystal Reports to MAPI'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-777147222083302726</id><published>2009-01-24T07:30:00.000-08:00</published><updated>2009-01-24T07:31:41.876-08:00</updated><title type='text'>Finding the position of the first character from a list of characters</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;&lt;span style="font-family: verdana;"&gt;The code below is useful when you want to find the position of first character from a list of characters within a string. This would typically be used when looking for carriage returns, eg:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;   &lt;span style="font-family: courier new;"&gt; Debug.Print StringFirstFirstChars(sSearch,vbNewline,vbCr,vbLf)&lt;/span&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The code below is useful when you want to find the position of first character from a list of characters within a string. This would typically be used when looking for carriage returns, eg:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;    Debug.Print StringFirstFirstChars(sSearch,vbNewline,vbCr,vbLf)&lt;br /&gt;&lt;br /&gt;'Purpose     :  Finds the position of the first character found in a string from a list of characters.&lt;br /&gt;'Inputs      :  sSearchIn           The string to search for the first instance of a character from the character list&lt;br /&gt;'               avChars             The list of characters to search through "sSearchIn" for&lt;br /&gt;'Outputs     :  Returns the position of first instance of a character found in a string from the list of supplied characters,&lt;br /&gt;'               or zero if none of the characters are found&lt;br /&gt;'Example     :  If your wanted to find a line feed, you might use:&lt;br /&gt;'               Debug.Print StringFindFirstChar("ABCDEF","B","E","F")&lt;br /&gt;'               'This would return 2, i.e. the position of character "B"&lt;br /&gt;'Revisions   :&lt;br /&gt;&lt;br /&gt;Function StringFindFirstChar(sSearchIn As String, ParamArray avChars() As Variant) As Long&lt;br /&gt;    Dim lPosChar As Long, lPosTest As Long, vChar As Variant&lt;br /&gt;   &lt;br /&gt;    On Error GoTo ErrFailed&lt;br /&gt;    If Len(sSearchIn) Then&lt;br /&gt;        For Each vChar In avChars&lt;br /&gt;            lPosTest = InStr(1, sSearchIn, CStr(vChar))&lt;br /&gt;            If lPosTest Then&lt;br /&gt;                If lPosChar = 0 Then&lt;br /&gt;                    lPosChar = lPosTest&lt;br /&gt;                ElseIf lPosTest &lt; lPosChar Then&lt;br /&gt;                    lPosChar = lPosTest&lt;br /&gt;                End If&lt;br /&gt;            End If&lt;br /&gt;        Next&lt;br /&gt;    End If&lt;br /&gt;    StringFindFirstChar = lPosChar&lt;br /&gt;    Exit Function&lt;br /&gt;&lt;br /&gt;ErrFailed:&lt;br /&gt;    Debug.Print Err.Description&lt;br /&gt;    Debug.Assert False&lt;br /&gt;    'Try the next line&lt;br /&gt;    Resume Next&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-777147222083302726?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/777147222083302726/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=777147222083302726' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/777147222083302726'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/777147222083302726'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/finding-position-of-first-character_3358.html' title='Finding the position of the first character from a list of characters'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-154585143504258845</id><published>2009-01-24T07:28:00.000-08:00</published><updated>2009-01-24T07:29:35.053-08:00</updated><title type='text'>Search for a specific string and replace it with another</title><content type='html'>&lt;div style="text-align: justify; font-family: courier new;"&gt;Function sReplace(SearchLine as String, SearchFor as String, ReplaceWith as String)&lt;br /&gt;    Dim vSearchLine as String, found as Integer&lt;br /&gt;   &lt;br /&gt;    found = InStr(SearchLine, SearchFor): vSearchLine = SearchLine&lt;br /&gt;    If found &lt;&gt; 0 Then&lt;br /&gt;        vSearchLine = ""&lt;br /&gt;        If found &gt; 1 Then vSearchLine = Left(SearchLine, found - 1)&lt;br /&gt;        vSearchLine = vSearchLine + ReplaceWith&lt;br /&gt;        If found + Len(SearchFor) - 1 &lt; Len(SearchLine) Then _&lt;br /&gt;            vSearchLine = vSearchLine + Right$(SearchLine, Len(SearchLine) - found - Len(SearchFor) + 1)&lt;br /&gt;    end If&lt;br /&gt;    sReplace = vSearchLine&lt;br /&gt;   &lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;* another routine *&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Only 17 lines of code for a super-fast find-and-replace function:&lt;br /&gt;&lt;br /&gt;-- start code --&lt;br /&gt;&lt;br /&gt;    '  Copy *both* functions to VBScript or VB application:&lt;br /&gt;    '  FindReplace and ReplaceFirstInstance&lt;br /&gt;    '&lt;br /&gt;    Function FindReplace(SourceString, SearchString, ReplaceString)&lt;br /&gt;        tmpString1 = SourceString&lt;br /&gt;        do Until vFixed&lt;br /&gt;            tmpString2 = tmpString1&lt;br /&gt;            tmpString1 = ReplaceFirstInstance(tmpString1, SearchString,ReplaceString)&lt;br /&gt;            If tmpString1 = tmpString2 Then vFixed = True&lt;br /&gt;        Loop&lt;br /&gt;        FindReplace = tmpString1&lt;br /&gt;    end Function&lt;br /&gt;&lt;br /&gt;    Function ReplaceFirstInstance(SourceString, SearchString, ReplaceString)&lt;br /&gt;        FoundLoc = InStr(1, SourceString, SearchString)&lt;br /&gt;        If FoundLoc &lt;&gt; 0 Then&lt;br /&gt;            ReplaceFirstInstance = Left(SourceString, FoundLoc - 1) &amp;amp; _&lt;br /&gt;        ReplaceString &amp;amp; Right(SourceString, _&lt;br /&gt;        Len(SourceString) - (FoundLoc - 1) - Len(SearchString))&lt;br /&gt;        Else&lt;br /&gt;            ReplaceFirstInstance = SourceString&lt;br /&gt;        end If&lt;br /&gt;    end Function&lt;br /&gt;&lt;br /&gt;--- end code -&lt;br /&gt;&lt;br /&gt; Just to clarify, one function is used to go through the entire string and&lt;br /&gt;replace all instances of the search string ("Replace All").  The other&lt;br /&gt;function is used to only replace the first instance of the search string&lt;br /&gt;("Replace").  The former loops the latter until there are no more instances&lt;br /&gt;of the search string.&lt;br /&gt;&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Function FindReplace(SourceString, searchstring, replacestring)&lt;br /&gt;    tmpString1 = SourceString&lt;br /&gt;    do Until vFixed&lt;br /&gt;        tmpString2 = tmpString1&lt;br /&gt;        tmpString1 = ReplaceFirstInstance(tmpString1, searchstring,&lt;br /&gt;replacestring)&lt;br /&gt;        If tmpString1 = tmpString2 Then vFixed = True&lt;br /&gt;    loop&lt;br /&gt;    FindReplace = tmpString1&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;Function ReplaceFirstInstance(SourceString, searchstring, replacestring)&lt;br /&gt;    Static StartLoc '*&lt;br /&gt;    If StartLoc = 0 Then StartLoc = 1 '*&lt;br /&gt;    FoundLoc = InStr(StartLoc, SourceString, searchstring) '*&lt;br /&gt;    If FoundLoc &lt;&gt; 0 Then&lt;br /&gt;            ReplaceFirstInstance = Left(SourceString, FoundLoc - 1) &amp;amp; _&lt;br /&gt;            replacestring &amp;amp; Right(SourceString, _&lt;br /&gt;            Len(SourceString) - (FoundLoc - 1) - Len(searchstring))&lt;br /&gt;            StartLoc = FoundLoc + Len(replacestring) '*&lt;br /&gt;    Else&lt;br /&gt;        StartLoc = 1 '*&lt;br /&gt;        ReplaceFirstInstance = SourceString&lt;br /&gt;    end If&lt;br /&gt;End Function&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Return&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-154585143504258845?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/154585143504258845/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=154585143504258845' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/154585143504258845'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/154585143504258845'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/search-for-specific-string-and-replace.html' title='Search for a specific string and replace it with another'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1521385757339130587</id><published>2009-01-24T07:26:00.000-08:00</published><updated>2009-01-24T07:27:35.134-08:00</updated><title type='text'>Search and Replace Text</title><content type='html'>&lt;span style="font-family: verdana;"&gt;To search and replace text in a variable use the following (please read the notes for guidance on how to use this routine).&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Purpose     :  Searches and replaces all instances of a string within a variable.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Inputs      :  sText                       The string to search.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               sReplaceThis                The string to replace.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               sWithThis                   The replacement string.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               [lNumReplacements]          Returns the number of times a replacement was made.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Outputs     :  N/A&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Notes       :  This routines output parameters are passed in ByRef for speed and hence it should be called:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               Dim sOutputText as String   'Create a variable to hold the value in&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               sOutputText = "aaaaaa"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               SearchAndReplace sOutputText, "a", "b"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               Debug.Print sOutputText&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Sub SearchAndReplace(ByRef sText As String, ByVal sReplaceThis As String, ByVal sWithThis As String, Optional ByRef lNumReplacements As Long)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lPos As Long, lLenOriginal As Long, lLenReplace As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    lLenOriginal = Len(sReplaceThis)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    lLenReplace = Len(sWithThis)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    If lLenOriginal Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        lPos = InStr(1, sText, sReplaceThis)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Do While lPos &gt; 0&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            lNumReplacements = lNumReplacements + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            If lLenOriginal = lLenReplace Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Mid$(sText, lPos, Len(sReplaceThis)) = sWithThis&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                sText = Left$(sText, lPos - 1) &amp;amp; sWithThis &amp;amp; Mid$(sText, lPos + lLenOriginal)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            lPos = InStr(lPos + lLenOriginal, sText, sReplaceThis)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Sub&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1521385757339130587?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1521385757339130587/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1521385757339130587' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1521385757339130587'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1521385757339130587'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/search-and-replace-text.html' title='Search and Replace Text'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-5820386356565019469</id><published>2009-01-24T07:24:00.000-08:00</published><updated>2009-01-24T07:25:56.793-08:00</updated><title type='text'>Finding the position of the first character from a list of characters</title><content type='html'>&lt;span style="font-family: verdana;"&gt;The code below is useful when you want to find the position of first character from a list of characters within a string. This would typically be used when looking for carriage returns, eg:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Print StringFirstFirstChars(sSearch,vbNewline,vbCr,vbLf)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;The code below is useful when you want to find the position of first character from a list of characters within a string. This would typically be used when looking for carriage returns, eg:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Print StringFirstFirstChars(sSearch,vbNewline,vbCr,vbLf)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Purpose     :  Finds the position of the first character found in a string from a list of characters.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Inputs      :  sSearchIn           The string to search for the first instance of a character from the character list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               avChars             The list of characters to search through "sSearchIn" for&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Outputs     :  Returns the position of first instance of a character found in a string from the list of supplied characters,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               or zero if none of the characters are found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Example     :  If your wanted to find a line feed, you might use:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               Debug.Print StringFindFirstChar("ABCDEF","B","E","F")&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               'This would return 2, i.e. the position of character "B"&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Revisions   :&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Function StringFindFirstChar(sSearchIn As String, ParamArray avChars() As Variant) As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lPosChar As Long, lPosTest As Long, vChar As Variant&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    On Error GoTo ErrFailed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    If Len(sSearchIn) Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        For Each vChar In avChars&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            lPosTest = InStr(1, sSearchIn, CStr(vChar))&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            If lPosTest Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                If lPosChar = 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    lPosChar = lPosTest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                ElseIf lPosTest &lt;&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    lPosChar = lPosTest&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    StringFindFirstChar = lPosChar&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Exit Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ErrFailed:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Print Err.Description&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Assert False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    'Try the next line&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Resume Next&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Function&lt;/span&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-5820386356565019469?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/5820386356565019469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=5820386356565019469' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5820386356565019469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/5820386356565019469'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/finding-position-of-first-character_24.html' title='Finding the position of the first character from a list of characters'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-1632328002720705721</id><published>2009-01-24T07:11:00.000-08:00</published><updated>2009-01-24T07:24:04.796-08:00</updated><title type='text'>Trin Function : Performing a custom Trim() on an input string</title><content type='html'>&lt;div style="text-align: justify;"&gt;&lt;span style="font-family: verdana;"&gt;The RTrim, LTrim and Trim functions are useful from removing blank spaces. However, sometimes you want to remove different trailing/leading characters (eg, Remove all the vbNewLine from the start and end of a string). The function below allows you to specify a custom Trim:&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Purpose     :  Trims trailing a leading characters from a string buffer&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Inputs      :  sValue                  The string to trim&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               sRemove                 The character/s to remove from the start/end of the sValue&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               [bRtrim]                If True removes any matching right hand side chars&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               [bLtrim]                If True removes any matching left hand side chars&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'               [eCompare]              The method of comparison&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Outputs     :  Returns the string trimed from the specified characters&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: verdana;"&gt;'Notes       :  Trim2("aaaaaBBBBCCCaaaa", "a") returns "BBBBCCC"&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;Function Trim2(ByVal sValue As String, sRemove As String, Optional bRtrim As Boolean = True, Optional bLTrim As Boolean = True, Optional eCompare As VbCompareMethod = vbBinaryCompare) As String&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Dim lPos As Long, lLastChar As Long, lLenRemove As Long&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    On Error GoTo ErrFailed&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    lLenRemove = Len(sRemove)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    If lLenRemove &gt; 0 And Len(sValue) &gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        If bLTrim Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            'Remove the left hand chars&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            lPos = 1 - lLenRemove&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            lLastChar = 1 - lLenRemove&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            'Loop finding the chars to replace&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                lPos = InStr(lPos + lLenRemove, sValue, sRemove, eCompare)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                If lPos = lLastChar + lLenRemove Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    lLastChar = lPos&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    'Found all the matching characters&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    Exit Do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            If lLastChar Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                sValue = Mid$(sValue, lLastChar + lLenRemove)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        If bRtrim = True And Len(sValue) &gt; 0 Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            'Remove the right hand chars&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            lPos = Len(sValue) + 1&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            lLastChar = lPos&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            &lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            'Loop finding the chars to replace&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                lPos = InStrRev(sValue, sRemove, lPos - 1, eCompare)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                If lPos = lLastChar - lLenRemove Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    lLastChar = lPos&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                Else&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    'Found all the matching characters&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                    Exit Do&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            Loop&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            If lLastChar Then&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;                sValue = Left$(sValue, lLastChar - 1)&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;            End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;        End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    End If&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Trim2 = sValue&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Exit Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;ErrFailed:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Print "Error in Trim2: " &amp;amp; Err.Description&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;    Debug.Assert False&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;End Function&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/3509162107510152399-1632328002720705721?l=lernvb.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://lernvb.blogspot.com/feeds/1632328002720705721/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=3509162107510152399&amp;postID=1632328002720705721' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1632328002720705721'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/3509162107510152399/posts/default/1632328002720705721'/><link rel='alternate' type='text/html' href='http://lernvb.blogspot.com/2009/01/trin-function-performing-custom-trim-on.html' title='Trin Function : Performing a custom Trim() on an input string'/><author><name>Pop's World</name><uri>http://www.blogger.com/profile/04964875113190825498</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-3509162107510152399.post-2485373735172285993</id><published>2009-01-24T07:10:00.000-08:00</published><updated>2009-01-24T07:11:24.374-08:00</updated><title type='text'>Finding the position of the first character from a list of characters</title><content type='html'>&lt;span style="font-family: courier new;"&gt;Debug.Print StringFirstFirstChars(sSearch,vbNewline,vbCr,vbLf)&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Purpose     :  Finds the position of the first character found in a string from a list of characters.&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Inputs      :  sSearchIn           The string to search for the first instance of a character from the character list&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               avChars             The list of characters to search through "sSearchIn" for&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Outputs     :  Returns the position of first instance of a character found in a string from the list of supplied characters,&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               or zero if none of the characters are found&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'Example     :  If your wanted to find a line feed, you might use:&lt;/span&gt;&lt;br /&gt;&lt;span style="font-family: courier new;"&gt;'               Debug.Print StringFindFirstCha
