<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
  <channel>
    <title>VBA Forum RSS Feed (Replies Included)</title>
    <link>http://www.programmersheaven.com/</link>
    <description>Contains the latest posts from the 'VBA' forum at Programmer's Heaven, including replies.</description>
    <language>en</language>
    <copyright>Copyright 2013 Programmers Heaven</copyright>
    <pubDate>Wed, 19 Jun 2013 17:17:44 -0700</pubDate>
    <lastBuildDate>Wed, 19 Jun 2013 17:17:44 -0700</lastBuildDate>
    <generator>Argotic Syndication Framework 2007.3.0.1, http://www.codeplex.com/Argotic</generator>
    <docs>http://www.rssboard.org/rss-specification</docs>
    <ttl>360</ttl>
    <image>
      <url>http://www.programmersheaven.com/images/ph.gif</url>
      <title>Programmers Heaven</title>
      <link>http://www.programmersheaven.com/</link>
      <width>88</width>
      <height>31</height>
    </image>
    <item>
      <title>Copy\Paste</title>
      <link>http://www.programmersheaven.com/mb/vba/432063/432063/copypaste/</link>
      <description>I could use some help with the code that I have put together. &lt;br /&gt;
The problem I am having is with the copy and paste or really with just the paste. &lt;br /&gt;
&lt;br /&gt;
Here is how things should work:&lt;br /&gt;
1. I would open a worksheet and find the Cross Reference information in that sheet that I would like copy. &lt;br /&gt;
2. I would then run my code and get a message box saying (Do you want to copy?) (Yes\No)&lt;br /&gt;
If yes a box will appear saying (Copy Area). I would then select the area on the spreadsheet that I would like &lt;br /&gt;
to copy. Select Ok &lt;br /&gt;
3. Next another textbox will appear asking me to enter the Cross Ref# that I would like to search for. I enter the &lt;br /&gt;
number and the search will begin. The search would be on the active workbook and be asked to search the &lt;br /&gt;
directory for other workbooks for the Cross Ref#. This all works fine.&lt;br /&gt;
&lt;br /&gt;
My Issue:&lt;br /&gt;
&lt;br /&gt;
Here is my issue and what I am looking for the code to do. &lt;br /&gt;
Every time that the Cross Reference # is found in my search I would like the option to paste the information or not paste the information (Yes/No). But that the search continues till no value is found.&lt;br /&gt;
Which means it will continue to search the workbook as well as the active directory opening up workbooks searching for the Cross Ref# &lt;br /&gt;
The code works fine in copying the information. As well as searching for the information. It just I cannot get it to paste that information or not paste the information. &lt;br /&gt;
&lt;br /&gt;
I am not a Programmer. So I have been working on this for a long while. Your help would be great!!!  &lt;br /&gt;
&lt;pre class="sourcecode"&gt;Option Explicit
    Sub Copy_2()
    Dim ws     As Worksheet
    Dim rFound As Range
    Dim strName As String
    Dim doyou  As String
    Dim docopy$
    Dim xArea  As Range
    Dim eArea  As Range
    Dim xData  As Workbook
    Dim xName$, ePath$
    Dim fPicker As Object
    Dim bsearch$
     With Application
         '    .ScreenUpdating = False
        .EnableEvents = False
        .DisplayAlerts = False
    End With
docopy = MsgBox("Do you want to copy?", vbYesNo)
                If docopy = vbYes Then
                    Set xArea = Application.InputBox(prompt:="Copy Area", title:="Select Range", Type:=8)
                    Rem any select any worksheet And cell
       strName = InputBox("Enter Cross Ref#")
    If strName = "" Then Exit Sub
    For Each ws In Worksheets
        With ws.UsedRange
         ActiveWindow.ScrollColumn = 1
         ActiveWindow.SmallScroll ToLeft:=1
            Set rFound = .Find(what:=strName, After:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole)
            If Not rFound Is Nothing Then
                Application.Goto rFound, True
                 ActiveWindow.ScrollColumn = 1
                 ActiveWindow.SmallScroll ToLeft:=1
                doyou = MsgBox("Do you want to continue searching?", vbYesNo)
                If doyou = vbNo Then Exit Sub
       
            End If
        End With
    Next ws
    MsgBox "Value not found"
    End If
    doyou = MsgBox("Do you want to Search Directory?", vbYesNo)
     If doyou = vbNo Then Exit Sub
      Do
        Set fPicker = Application.FileDialog(msoFileDialogFolderPicker)
        With fPicker
            .Show
            ePath = .SelectedItems(1) &amp;amp; "\"
        End With
        xName = Dir(ePath &amp;amp; "*.xls*")
        Do While Len(xName) &amp;gt; 0
            Set xData = Workbooks.Open(ePath &amp;amp; xName)
            For Each ws In Worksheets
        With ws.UsedRange
        ActiveWindow.ScrollColumn = 1
        ActiveWindow.SmallScroll ToLeft:=1
            Set rFound = .Find(what:=strName, After:=.Cells(1, 1), LookIn:=xlValues, LookAt:=xlWhole)
            If strName = "" Then Exit Sub
            If Not rFound Is Nothing Then
                Application.Goto rFound, True
                 ActiveWindow.ScrollColumn = 1
                 ActiveWindow.SmallScroll ToLeft:=1
                doyou = MsgBox("Do you want to continue searching?", vbYesNo)
                If doyou = vbNo Then Exit Sub
       
            End If
       
                End With
            Next ws
            xData.Close False
                    xName = Dir
        Loop
        bsearch = MsgBox("Value not found, do you want to search another directory?", vbYesNo)
    Loop Until bsearch = vbNo
    With Application
         ' .ScreenUpdating = True
        .EnableEvents = True
        .DisplayAlerts = True
  
        End With
    
    MsgBox "Value not found"
End Sub



&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/432063/432063/copypaste/</guid>
      <pubDate>Mon, 13 May 2013 11:25:00 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Re: PPT VBA - Assign text box value to variable</title>
      <link>http://www.programmersheaven.com/mb/vba/431599/431661/re-ppt-vba---assign-text-box-value-to-variable/#431661</link>
      <description>Hello&lt;br /&gt;
&lt;br /&gt;
You've probably already worked this out but just in case here's my suggestion. Since I don't know what code you've written and how you've set up your forms and I haven't worked with PowerPoint VBA forms (just Word, Excel, and Access) I'm making the assumption that PowerPoint isn't any different.  &lt;br /&gt;
&lt;br /&gt;
' frmFinalJeopardy - User form that stores the "wager" field.&lt;br /&gt;
&lt;br /&gt;
' In the main body of your code Load the User Form&lt;br /&gt;
Load frmFinalJeopardy&lt;br /&gt;
' If you know the Max Amount they can wager you can assign it to the field before you display the form to the user. &lt;br /&gt;
frmFinalJeopardy.wager = curMaxAvailable&lt;br /&gt;
&lt;br /&gt;
' Display the form to the user&lt;br /&gt;
frmFinalJeopardy.Show&lt;br /&gt;
&lt;br /&gt;
' Once the user has entered their wager and hit a command button on the form you can hide the form from the user but it stays in memory so you can still access the data on the form.&lt;br /&gt;
frmFinalJeopardy.Hide&lt;br /&gt;
&lt;br /&gt;
' At this point you can check the value and make corrections (i.e., if they entered a negative number or more than they have to wager). You can use the same process above to change the value of the wager field, display an error message, and Show the form again so the user can make corrections.&lt;br /&gt;
&lt;br /&gt;
' Assign the value from the wager field that's on the frmFinalJeopardy form to the finalwager variable. &lt;br /&gt;
&lt;br /&gt;
'Val function will take the fields numeric value. If the user entered nothing or entered text it will 'display as 0. &lt;br /&gt;
&lt;br /&gt;
'Format is just there to display the value as currency.&lt;br /&gt;
finalwager = Format(Val(frmFinalJeopardy.wager), "$#,000,000.00")  &lt;br /&gt;
&lt;br /&gt;
' Remove the form from memory&lt;br /&gt;
Unload frmFinalJeopardy&lt;br /&gt;
&lt;br /&gt;
Hope that helps.&lt;br /&gt;
&lt;br /&gt;
Bill&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/431599/431661/re-ppt-vba---assign-text-box-value-to-variable/#431661</guid>
      <pubDate>Fri, 22 Mar 2013 16:47:15 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Re: PPT VBA - Assign text box value to variable</title>
      <link>http://www.programmersheaven.com/mb/vba/431599/431660/re-ppt-vba---assign-text-box-value-to-variable/#431660</link>
      <description>Hello&lt;br /&gt;
&lt;br /&gt;
You've probably already worked this out but just in case here's my suggestion. Since I don't know what code you've written and how you've set up your forms and I haven't worked with PowerPoint VBA forms (just Word, Excel, and Access) I'm making the assumption that PowerPoint isn't any different.  &lt;br /&gt;
&lt;br /&gt;
' frmFinalJeopardy - User form that stores the "wager" field.&lt;br /&gt;
&lt;br /&gt;
' In the main body of your code Load the User Form&lt;br /&gt;
Load frmFinalJeopardy&lt;br /&gt;
' If you know the Max Amount they can wager you can assign it to the field before you display the form to the user. &lt;br /&gt;
frmFinalJeopardy.wager = curMaxAvailable&lt;br /&gt;
&lt;br /&gt;
' Display the form to the user&lt;br /&gt;
frmFinalJeopardy.Show&lt;br /&gt;
&lt;br /&gt;
' Once the user has entered their wager and hit a command button on the form you can hide the form from the user but it stays in memory so you can still access the data on the form.&lt;br /&gt;
frmFinalJeopardy.Hide&lt;br /&gt;
&lt;br /&gt;
' At this point you can check the value and make corrections (i.e., if they entered a negative number or more than they have to wager). You can use the same process above to change the value of the wager field, display an error message, and Show the form again so the user can make corrections.&lt;br /&gt;
&lt;br /&gt;
' Assign the value from the wager field that's on the frmFinalJeopardy form to the finalwager variable. &lt;br /&gt;
&lt;br /&gt;
'Val function will take the fields numeric value. If the user entered nothing or entered text it will 'display as 0. &lt;br /&gt;
&lt;br /&gt;
'Format is just there to display the value as currency.&lt;br /&gt;
finalwager = Format(Val(frmFinalJeopardy.wager), "$#,000,000.00")  &lt;br /&gt;
&lt;br /&gt;
' Remove the form from memory&lt;br /&gt;
Unload frmFinalJeopardy&lt;br /&gt;
&lt;br /&gt;
Hope that helps.&lt;br /&gt;
&lt;br /&gt;
Bill&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/431599/431660/re-ppt-vba---assign-text-box-value-to-variable/#431660</guid>
      <pubDate>Fri, 22 Mar 2013 16:44:29 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>PPT VBA - Assign text box value to variable</title>
      <link>http://www.programmersheaven.com/mb/vba/431599/431599/ppt-vba---assign-text-box-value-to-variable/</link>
      <description>Hi there,&lt;br /&gt;
&lt;br /&gt;
I'm fairly new to VBA, so I am not sure this is possible, but it seems like it should be... I am working on a Jeopardy project. I found a free template with scoring online, but there was no Final Jeopardy option, so I've been trying to code that in. The other scoring is fairly straightfoward - objects have been assigned macros which add 100, 200, or 300 points to the score variable.&lt;br /&gt;
&lt;br /&gt;
For Final Jeopardy, the competitor (there's only one, so no need to worry about multiple teams for this) needs to be able to enter any point value. I created an ActiveX texbox control named "wager" in which this value could be input. I have defined a variable (Dim finalwager as long) for the final wager output. The issue is that I can't seem to find the right code to assign the value in the wager input box to finalwager.&lt;br /&gt;
&lt;br /&gt;
I have a sample of the presentation available (3MB - too big to attach). It's a last-minute project, and the game is March 18 (tomorrow, joy) - I've been researching this problem for 3 days now with no luck. Thanks in advance for any assistance.</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/431599/431599/ppt-vba---assign-text-box-value-to-variable/</guid>
      <pubDate>Sun, 17 Mar 2013 09:52:58 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>RightFax Utility- Open and Print all Incoming Faxes</title>
      <link>http://www.programmersheaven.com/mb/vba/431328/431328/rightfax-utility--open-and-print-all-incoming-faxes/</link>
      <description>I know some VBA but I do not know any other languages. There may be other languages that are better suited to help me with my problem. I am open to suggestions and always eager to learn more. &lt;br /&gt;
&lt;br /&gt;
Here is the issue at hand:&lt;br /&gt;
My boss receives large groups of faxes via RightFax Utility. Currently she opens each of the incoming faxes one by one in order to print them. I am curious, is there a way to print all incoming faxes at once?&lt;br /&gt;
&lt;br /&gt;
Advice is very appreciated. &lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
Anna&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/431328/431328/rightfax-utility--open-and-print-all-incoming-faxes/</guid>
      <pubDate>Tue, 19 Feb 2013 06:58:51 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>RightFax Utility- Open and Print all Incoming Faxes</title>
      <link>http://www.programmersheaven.com/mb/vba/431327/431327/rightfax-utility--open-and-print-all-incoming-faxes/</link>
      <description>I know some VBA but I do not know any other languages. There may be other languages that are better suited to help me with my problem. I am open to suggestions and always eager to learn more. &lt;br /&gt;
&lt;br /&gt;
Here is the issue at hand:&lt;br /&gt;
My boss receives large groups of faxes via RightFax Utility. Currently she opens each of the incoming faxes one by one in order to print them. I am curious, is there a way to print all incoming faxes at once?&lt;br /&gt;
&lt;br /&gt;
Advice is very appreciated. &lt;br /&gt;
&lt;br /&gt;
Thank you,&lt;br /&gt;
Anna&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/431327/431327/rightfax-utility--open-and-print-all-incoming-faxes/</guid>
      <pubDate>Tue, 19 Feb 2013 06:57:00 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>VBA code to divide numbers for percentages</title>
      <link>http://www.programmersheaven.com/mb/vba/431151/431151/vba-code-to-divide-numbers-for-percentages/</link>
      <description>I'm using Access 2007.  I have VBA code that takes a budget amount as a currency veriable and subtracts from it a sum of expenditure YTD currency variable, which works fine resulting with a budget balance remaining.  I tried adding code to divide the sum variable by the budget variable, but the percent that is returned is 0.00%  My table fields are currency and the form field is formated to percent.  Any help to return the actual percent would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;Private Sub cmdOpenBalance_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryExpendStnd"
DoCmd.SetWarnings True
Dim strHoldYear As String
Dim curHoldRent As Currency
Dim curHoldFurn As Currency
Dim curHoldSecD As Currency
Dim curHoldRehb As Currency
Dim curHoldCont As Currency
Dim curSumRent As Currency
Dim curSumFurn As Currency
Dim curSumSecD As Currency
Dim curSumRehb As Currency
Dim curSumCont As Currency
DoCmd.OpenForm "frmBudget"
strHoldYear = Forms![frmBudget]![BudgetYear]
curHoldRent = Forms![frmBudget]![RentStipends]
curHoldFurn = Forms![frmBudget]![FurnitureHoushld]
curHoldSecD = Forms![frmBudget]![SecDeposit]
curHoldRehb = Forms![frmBudget]![Rehab]
curHoldCont = Forms![frmBudget]![Contingency]
DoCmd.Close acForm, "frmBudget"
DoCmd.OpenForm "frmSumRent"
curSumRent = Forms![frmSumRent]![SumOfAmount1]
DoCmd.Close acForm, "frmSumRent"
DoCmd.OpenForm "frmSumFurnHoushld"
curSumFurn = Forms![frmSumFurnHoushld]![SumOfAmount1]
DoCmd.Close acForm, "frmSumFurnHoushld"
DoCmd.OpenForm "frmSumSecDep"
curSumSecD = Forms![frmSumSecDep]![SumOfAmount1]
DoCmd.Close acForm, "frmSumSecDep"
DoCmd.OpenForm "frmSumRehab"
curSumRehb = Forms![frmSumRehab]![SumOfAmount1]
DoCmd.Close acForm, "frmSumRehab"
DoCmd.OpenForm "frmSumContin"
curSumCont = Forms![frmSumContin]![SumOfAmount1]
DoCmd.Close acForm, "frmSumContin"
DoCmd.OpenForm "frmBalance"
Forms![frmBalance]![BudgetYear] = strHoldYear
Forms![frmBalance]![RentStipends] = curHoldRent - curSumRent
Forms![frmBalance]![RentPercent] = curSumRent / curHoldRent
Forms![frmBalance]![FurnitureHoushld] = curHoldFurn - curSumFurn
Forms![frmBalance]![FurnPercent] = curSumFurn / curHoldFurn
Forms![frmBalance]![SecDeposit] = curHoldSecD - curSumSecD
Forms![frmBalance]![SecDPercent] = curSumSecD / curHoldSecD
Forms![frmBalance]![Rehab] = curHoldRehb - curSumRehb
Forms![frmBalance]![RehPercent] = curSumRehb / curHoldRehb
Forms![frmBalance]![Contingency] = curHoldCont - curSumCont
Forms![frmBalance]![ContinPercent] = curSumCont / curHoldCont


End Sub&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/431151/431151/vba-code-to-divide-numbers-for-percentages/</guid>
      <pubDate>Fri, 01 Feb 2013 11:18:44 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>VBA code to divide numbers for percentages</title>
      <link>http://www.programmersheaven.com/mb/vba/431150/431150/vba-code-to-divide-numbers-for-percentages/</link>
      <description>I'm using Access 2007.  I have VBA code that takes a budget amount as a currency veriable and subtracts from it a sum of expenditure YTD currency variable, which works fine resulting with a budget balance remaining.  I tried adding code to divide the sum variable by the budget variable, but the percent that is returned is 0.00%  My table fields are currency and the form field is formated to percent.  Any help to return the actual percent would be greatly appreciated.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;Private Sub cmdOpenBalance_Click()
DoCmd.SetWarnings False
DoCmd.OpenQuery "qryExpendStnd"
DoCmd.SetWarnings True
Dim strHoldYear As String
Dim curHoldRent As Currency
Dim curHoldFurn As Currency
Dim curHoldSecD As Currency
Dim curHoldRehb As Currency
Dim curHoldCont As Currency
Dim curSumRent As Currency
Dim curSumFurn As Currency
Dim curSumSecD As Currency
Dim curSumRehb As Currency
Dim curSumCont As Currency
DoCmd.OpenForm "frmBudget"
strHoldYear = Forms![frmBudget]![BudgetYear]
curHoldRent = Forms![frmBudget]![RentStipends]
curHoldFurn = Forms![frmBudget]![FurnitureHoushld]
curHoldSecD = Forms![frmBudget]![SecDeposit]
curHoldRehb = Forms![frmBudget]![Rehab]
curHoldCont = Forms![frmBudget]![Contingency]
DoCmd.Close acForm, "frmBudget"
DoCmd.OpenForm "frmSumRent"
curSumRent = Forms![frmSumRent]![SumOfAmount1]
DoCmd.Close acForm, "frmSumRent"
DoCmd.OpenForm "frmSumFurnHoushld"
curSumFurn = Forms![frmSumFurnHoushld]![SumOfAmount1]
DoCmd.Close acForm, "frmSumFurnHoushld"
DoCmd.OpenForm "frmSumSecDep"
curSumSecD = Forms![frmSumSecDep]![SumOfAmount1]
DoCmd.Close acForm, "frmSumSecDep"
DoCmd.OpenForm "frmSumRehab"
curSumRehb = Forms![frmSumRehab]![SumOfAmount1]
DoCmd.Close acForm, "frmSumRehab"
DoCmd.OpenForm "frmSumContin"
curSumCont = Forms![frmSumContin]![SumOfAmount1]
DoCmd.Close acForm, "frmSumContin"
DoCmd.OpenForm "frmBalance"
Forms![frmBalance]![BudgetYear] = strHoldYear
Forms![frmBalance]![RentStipends] = curHoldRent - curSumRent
Forms![frmBalance]![RentPercent] = curSumRent / curHoldRent
Forms![frmBalance]![FurnitureHoushld] = curHoldFurn - curSumFurn
Forms![frmBalance]![FurnPercent] = curSumFurn / curHoldFurn
Forms![frmBalance]![SecDeposit] = curHoldSecD - curSumSecD
Forms![frmBalance]![SecDPercent] = curSumSecD / curHoldSecD
Forms![frmBalance]![Rehab] = curHoldRehb - curSumRehb
Forms![frmBalance]![RehPercent] = curSumRehb / curHoldRehb
Forms![frmBalance]![Contingency] = curHoldCont - curSumCont
Forms![frmBalance]![ContinPercent] = curSumCont / curHoldCont


End Sub&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/431150/431150/vba-code-to-divide-numbers-for-percentages/</guid>
      <pubDate>Fri, 01 Feb 2013 11:16:54 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Re: Commenting out segments</title>
      <link>http://www.programmersheaven.com/mb/vba/1434/431044/re-commenting-out-segments/#431044</link>
      <description>Select the correct materials. Various stuffs carry varied functions. With regards to selecting a plus dimension wedding ceremony gown, taffeta and satin are two of your hottest options due to fantastic elasticity. Also, these supplies appear fantastic with ruffle-a fairly accessory for nearly every plus size wedding dresses.It' s much better to pick a floor-length a-line fashion. &lt;a href="http://www.ycjcm.com/just-finding-a-modest-wedding-dress-can-be-a-feat-in-and-of-itself.html"&gt;A-line wedding dresses&lt;/a&gt; is well-known to become figure-flattering. Lengthy fashion definitely does much better in generating your figure slender.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/1434/431044/re-commenting-out-segments/#431044</guid>
      <pubDate>Tue, 22 Jan 2013 23:24:14 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Referencing Another Worksheet Dynamically</title>
      <link>http://www.programmersheaven.com/mb/vba/430863/430863/referencing-another-worksheet-dynamically/</link>
      <description>Hey everyone I'll try and keep this short. Basically I'm trying to create a Macro that wil create a summary sheet that I can re-use multiple times and I'm having trouble referencing the cells in the other workbooks.&lt;br /&gt;
&lt;br /&gt;
I've bolded the particular bit of code giving me trouble:&lt;br /&gt;
If x = 1 Then N = N - 1&lt;br /&gt;
    For i = 2 To N&lt;br /&gt;
        With Sheets("Summary Sheet")&lt;br /&gt;
                shtName = Sheets(i).Name&lt;br /&gt;
                 'Add a hyperlink to A1 of each sheet.&lt;br /&gt;
                .Range("B" &amp;amp; nRow).Hyperlinks.Add _&lt;br /&gt;
                Anchor:=.Range("B" &amp;amp; nRow), Address:="#'" &amp;amp; _&lt;br /&gt;
                shtName &amp;amp; "'!A1", TextToDisplay:=shtName&lt;br /&gt;
                .Range("B" &amp;amp; nRow).HorizontalAlignment = xlLeft&lt;br /&gt;
            .Range("A" &amp;amp; nRow).Value = nRow - 4&lt;br /&gt;
            &lt;strong&gt;.Range("C" &amp;amp; nRow).Value = "='shtName'!$D$5"&lt;/strong&gt;&lt;br /&gt;
            nRow = nRow + 1&lt;br /&gt;
        End With&lt;br /&gt;
&lt;br /&gt;
If you were to click on a cell in the 'C' column I want it to read "='WhatEverThisParticularSheetsNameIs'!$D$5 . My problem is that I'm using a variable I've defined as 'shtName' instead of going through and writting in each seperate sheets name. When I include shtName in the quotes it puts it as plane text rather than using the variable.&lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated! Keep in mind I'm pretty bad at VBA haha.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430863/430863/referencing-another-worksheet-dynamically/</guid>
      <pubDate>Fri, 11 Jan 2013 12:56:52 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Referencing Another Worksheet Dynamically</title>
      <link>http://www.programmersheaven.com/mb/vba/430862/430862/referencing-another-worksheet-dynamically/</link>
      <description>Hey everyone I'll try and keep this short. Basically I'm trying to create a Macro that wil create a summary sheet that I can re-use multiple times and I'm having trouble referencing the cells in the other workbooks.&lt;br /&gt;
&lt;br /&gt;
I've bolded the particular bit of code giving me trouble:&lt;br /&gt;
If x = 1 Then N = N - 1&lt;br /&gt;
    For i = 2 To N&lt;br /&gt;
        With Sheets("Summary Sheet")&lt;br /&gt;
                shtName = Sheets(i).Name&lt;br /&gt;
                 'Add a hyperlink to A1 of each sheet.&lt;br /&gt;
                .Range("B" &amp;amp; nRow).Hyperlinks.Add _&lt;br /&gt;
                Anchor:=.Range("B" &amp;amp; nRow), Address:="#'" &amp;amp; _&lt;br /&gt;
                shtName &amp;amp; "'!A1", TextToDisplay:=shtName&lt;br /&gt;
                .Range("B" &amp;amp; nRow).HorizontalAlignment = xlLeft&lt;br /&gt;
            .Range("A" &amp;amp; nRow).Value = nRow - 4&lt;br /&gt;
            &lt;strong&gt;.Range("C" &amp;amp; nRow).Value = "='shtName'!$D$5"&lt;/strong&gt;&lt;br /&gt;
            nRow = nRow + 1&lt;br /&gt;
        End With&lt;br /&gt;
&lt;br /&gt;
If you were to click on a cell in the 'C' column I want it to read "='WhatEverThisParticularSheetsNameIs'!$D$5 . My problem is that I'm using a variable I've defined as 'shtName' instead of going through and writting in each seperate sheets name. When I include shtName in the quotes it puts it as plane text rather than using the variable.&lt;br /&gt;
&lt;br /&gt;
Any help would be appreciated! Keep in mind I'm pretty bad at VBA haha.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430862/430862/referencing-another-worksheet-dynamically/</guid>
      <pubDate>Fri, 11 Jan 2013 12:55:02 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>copying files from one folder to another</title>
      <link>http://www.programmersheaven.com/mb/vba/430751/430751/copying-files-from-one-folder-to-another/</link>
      <description>I need ideas for the code for copying all *.xlsx files from one folder to another. &lt;br /&gt;
&lt;br /&gt;
I have all my code for working all my processes correctly and it works almost too smooth. (&lt;em&gt;I keep expecting it to hiccup somewhere, but it hasn't so far&lt;/em&gt;). I've already changed the focus to the correct folder on a network drive, now to complete the automation process, I need to copy the *.xlsx files from one folder to another. &lt;br /&gt;
&lt;br /&gt;
Anyone have any suggestions? &lt;br /&gt;
&lt;br /&gt;
Thanks for the help!!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430751/430751/copying-files-from-one-folder-to-another/</guid>
      <pubDate>Wed, 26 Dec 2012 13:10:43 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>copying files from one folder to another</title>
      <link>http://www.programmersheaven.com/mb/vba/430750/430750/copying-files-from-one-folder-to-another/</link>
      <description>I need ideas for the code for copying all *.xlsx files from one folder to another. &lt;br /&gt;
&lt;br /&gt;
I have all my code for working all my processes correctly and it works almost too smooth. (&lt;em&gt;I keep expecting it to hiccup somewhere, but it hasn't so far&lt;/em&gt;). I've already changed the focus to the correct folder on a network drive, now to complete the automation process, I need to copy the *.xlsx files from one folder to another. &lt;br /&gt;
&lt;br /&gt;
Anyone have any suggestions? &lt;br /&gt;
&lt;br /&gt;
Thanks for the help!!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430750/430750/copying-files-from-one-folder-to-another/</guid>
      <pubDate>Wed, 26 Dec 2012 12:28:21 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>VBA code for</title>
      <link>http://www.programmersheaven.com/mb/vba/430749/430749/vba-code-for/</link>
      <description>I need the code for copying all *.xlsx files from 1 folder to another. &lt;br /&gt;
&lt;br /&gt;
I have all my code for working all my processes correctly and it works almost too smooth. (I keep expecting it to hiccup somewhere, but it hasn't so far). Now, to complete the automation process, I need to copy the *.xlsx files from one folder to another. &lt;br /&gt;
&lt;br /&gt;
Anyone have any suggestions? &lt;br /&gt;
&lt;br /&gt;
Thanks for the help!!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430749/430749/vba-code-for/</guid>
      <pubDate>Wed, 26 Dec 2012 12:18:35 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>VBA code for</title>
      <link>http://www.programmersheaven.com/mb/vba/430748/430748/vba-code-for/</link>
      <description>I need the code for copying all *.xlsx files from 1 folder to another. &lt;br /&gt;
&lt;br /&gt;
I have all my code for working all my processes correctly and it works almost too smooth. (I keep expecting it to hiccup somewhere, but it hasn't so far). Now, to complete the automation process, I need to copy the *.xlsx files from one folder to another. &lt;br /&gt;
&lt;br /&gt;
Anyone have any suggestions? &lt;br /&gt;
&lt;br /&gt;
Thanks for the help!!!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430748/430748/vba-code-for/</guid>
      <pubDate>Wed, 26 Dec 2012 12:16:46 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Problems with fortran library</title>
      <link>http://www.programmersheaven.com/mb/vba/430587/430587/problems-with-fortran-library/</link>
      <description>Hello!!!&lt;br /&gt;
I am working with libraries to VBA Excel 2010 (xlsm format), but I have problems in the excel ouputs. This is my script:&lt;br /&gt;
* fortran 11&lt;br /&gt;
    Subroutine FortranDLL( Array1, upbound ) &lt;br /&gt;
    Implicit None &lt;br /&gt;
!DEC$ ATTRIBUTES STDCALL, REFERENCE, DLLEXPORT :: FortranDLL&lt;br /&gt;
    Integer :: upbound &lt;br /&gt;
    Integer :: Array1(1:upbound) &lt;br /&gt;
&lt;br /&gt;
    Integer :: i &lt;br /&gt;
    do i=1,upbound &lt;br /&gt;
    Array1(i)=288.16-0.0065*Array1(i) &lt;br /&gt;
    end do &lt;br /&gt;
    End Subroutine FortranDLL&lt;br /&gt;
&lt;br /&gt;
* visual basic macro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Option Explicit&lt;br /&gt;
Declare Sub fortrandll Lib "fortrandll.dll" (ByRef Array1 As Double, ByRef upbound As Long)&lt;br /&gt;
&lt;br /&gt;
Sub Button1_Click()&lt;br /&gt;
&lt;br /&gt;
Dim II As Long&lt;br /&gt;
Dim test(10) As Double&lt;br /&gt;
&lt;br /&gt;
ChDrive (ThisWorkbook.Path)&lt;br /&gt;
ChDir (ThisWorkbook.Path)&lt;br /&gt;
&lt;br /&gt;
II = 11&lt;br /&gt;
Call fortrandll(test(1), II)&lt;br /&gt;
Range("a1").Value = test(1)&lt;br /&gt;
Range("a2").Value = test(2)&lt;br /&gt;
Range("a3").Value = test(3)&lt;br /&gt;
Range("a4").Value = test(4)&lt;br /&gt;
Range("a5").Value = test(5)&lt;br /&gt;
Range("a6").Value = test(6)&lt;br /&gt;
Range("a7").Value = test(7)&lt;br /&gt;
Range("a8").Value = test(8)&lt;br /&gt;
Range("a9").Value = test(9)&lt;br /&gt;
Range("a10").Value = test(10)&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
The problem is that the output is “0” and it isn’t the solution.&lt;br /&gt;
Someone know what is wrong?&lt;br /&gt;
What is the solution?&lt;br /&gt;
&lt;br /&gt;
Tank!!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430587/430587/problems-with-fortran-library/</guid>
      <pubDate>Mon, 10 Dec 2012 12:24:20 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Problems with fortran library</title>
      <link>http://www.programmersheaven.com/mb/vba/430586/430586/problems-with-fortran-library/</link>
      <description>Hello!!!&lt;br /&gt;
I am working with libraries to VBA Excel 2010 (xlsm format), but I have problems in the excel ouputs. This is my script:&lt;br /&gt;
* fortran 11&lt;br /&gt;
    Subroutine FortranDLL( Array1, upbound ) &lt;br /&gt;
    Implicit None &lt;br /&gt;
!DEC$ ATTRIBUTES STDCALL, REFERENCE, DLLEXPORT :: FortranDLL&lt;br /&gt;
    Integer :: upbound &lt;br /&gt;
    Integer :: Array1(1:upbound) &lt;br /&gt;
&lt;br /&gt;
    Integer :: i &lt;br /&gt;
    do i=1,upbound &lt;br /&gt;
    Array1(i)=288.16-0.0065*Array1(i) &lt;br /&gt;
    end do &lt;br /&gt;
    End Subroutine FortranDLL&lt;br /&gt;
&lt;br /&gt;
* visual basic macro&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Option Explicit&lt;br /&gt;
Declare Sub fortrandll Lib "fortrandll.dll" (ByRef Array1 As Double, ByRef upbound As Long)&lt;br /&gt;
&lt;br /&gt;
Sub Button1_Click()&lt;br /&gt;
&lt;br /&gt;
Dim II As Long&lt;br /&gt;
Dim test(10) As Double&lt;br /&gt;
&lt;br /&gt;
ChDrive (ThisWorkbook.Path)&lt;br /&gt;
ChDir (ThisWorkbook.Path)&lt;br /&gt;
&lt;br /&gt;
II = 11&lt;br /&gt;
Call fortrandll(test(1), II)&lt;br /&gt;
Range("a1").Value = test(1)&lt;br /&gt;
Range("a2").Value = test(2)&lt;br /&gt;
Range("a3").Value = test(3)&lt;br /&gt;
Range("a4").Value = test(4)&lt;br /&gt;
Range("a5").Value = test(5)&lt;br /&gt;
Range("a6").Value = test(6)&lt;br /&gt;
Range("a7").Value = test(7)&lt;br /&gt;
Range("a8").Value = test(8)&lt;br /&gt;
Range("a9").Value = test(9)&lt;br /&gt;
Range("a10").Value = test(10)&lt;br /&gt;
End Sub&lt;br /&gt;
&lt;br /&gt;
The problem is that the output is “0” and it isn’t the solution.&lt;br /&gt;
Someone know what is wrong?&lt;br /&gt;
What is the solution?&lt;br /&gt;
&lt;br /&gt;
Tank!!!!!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430586/430586/problems-with-fortran-library/</guid>
      <pubDate>Mon, 10 Dec 2012 12:22:28 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>DeleteFile VBA Attachmate Reflections</title>
      <link>http://www.programmersheaven.com/mb/vba/430559/430559/deletefile-vba-attachmate-reflections/</link>
      <description>I am trying to delete the first line of text file using Attachmate Reflections 2011 VBA script. But the code does not work. How can I use "DeleteLines 1, 1"? any help would be appreciated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Const ForReading = 1, ForWriting = 2, ForAppending = 3&lt;br /&gt;
Dim fs, f&lt;br /&gt;
&lt;br /&gt;
Set fs = CreateObject("Scripting.FileSystemObject")&lt;br /&gt;
Set f = fs.OpenTextFile("C:\Batch_Manipulator_File.txt", ForWriting, TristateFalse)&lt;br /&gt;
&lt;br /&gt;
f.Write "Hello world!"&lt;br /&gt;
f.DeleteLines 1, 1&lt;br /&gt;
f.Close&lt;br /&gt;
&lt;br /&gt;
fs.CopyFile "C:\Temp.txt", True&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430559/430559/deletefile-vba-attachmate-reflections/</guid>
      <pubDate>Fri, 07 Dec 2012 18:39:42 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>DeleteFile VBA Attachmate Reflections</title>
      <link>http://www.programmersheaven.com/mb/vba/430558/430558/deletefile-vba-attachmate-reflections/</link>
      <description>I am trying to delete the first line of text file using Attachmate Reflections 2011 VBA script. But the code does not work. How can I use "DeleteLines 1, 1"? any help would be appreciated.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Const ForReading = 1, ForWriting = 2, ForAppending = 3&lt;br /&gt;
Dim fs, f&lt;br /&gt;
&lt;br /&gt;
Set fs = CreateObject("Scripting.FileSystemObject")&lt;br /&gt;
Set f = fs.OpenTextFile("C:\Batch_Manipulator_File.txt", ForWriting, TristateFalse)&lt;br /&gt;
&lt;br /&gt;
f.Write "Hello world!"&lt;br /&gt;
f.DeleteLines 1, 1&lt;br /&gt;
f.Close&lt;br /&gt;
&lt;br /&gt;
fs.CopyFile "C:\Temp.txt", True</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430558/430558/deletefile-vba-attachmate-reflections/</guid>
      <pubDate>Fri, 07 Dec 2012 18:37:00 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Problems with ActiveWorkbook.XmlImport &amp; ImportMap</title>
      <link>http://www.programmersheaven.com/mb/vba/430408/430408/problems-with-activeworkbookxmlimport--importmap/</link>
      <description>I've been working on a script that auto-creates a new *.xlsx workbook, imports the XSD map, and imports an XML file. I've just about worked out the bugs to have it use the new file and format the data as needed, then it filters out data based on vendor (I have a list of 52 vendors - and this part works beautifully), dumps the mined data to a new workbook, saves, closes, and continues. &lt;br /&gt;
&lt;br /&gt;
The problem I'm having is the map does not auto-import. It fails to import the map and data.&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Sub openxmlfile()
    Workbooks.Add
    ActiveWorkbook.XmlMaps.Add("\\Automation files\VendorDetails.xsd" _
        , "vendordetails").Name = "vendordetails_Map"
    ActiveWorkbook.XmlImport = ("\\VendPaymtDtl_12112621482978.xml")
End Sub
Public Sub VendorRecon()
'
'   This section prepares the yyyy Mmm - Vendor Recon File.xlsx
'
    Call openxmlfile
    Call borders
    Call SSN
    Call USD
    Call dates
    Call FName
    Call LName
    Call freeze
    Call rename_worksheet
    Call save
'
'   This section begins the creation of each vendor's *.xlsx recon file
'
    Call vendor_001
    Call copy
    Call create_new
    Call paste
    Call fit_hide
    Call page_format
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .PrintTitleRows = ""
        .PrintTitleColumns = ""
    End With
    Application.PrintCommunication = True
    ActiveSheet.PageSetup.PrintArea = ""
    Application.PrintCommunication = False
    With ActiveSheet.PageSetup
        .LeftFooter = "(001) Ada County"
    End With
    Application.PrintCommunication = True
    Call page_fit
    Sheets("Sheet1").Select
    Sheets("Sheet1").Name = "2012 Dec - (001) Vendor Recon"
    Call freeze
    ChDir "Y:\2012 Dec\Vendor Recon Files\My Recon Files"
    ActiveWorkbook.SaveAs Filename:= _
        "Y:\2012 Dec\Vendor Recon Files\My Recon Files\2012 Dec - (001) Vendor Recon File.xlsx" _
        , FileFormat:=51, Password:="x", WriteResPassword:="x", CreateBackup:=False
    Call close_window
'
    Call vendor_040
    .
    .
    .
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Here's my XSD Map:&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;
&amp;lt;xs:schema xmlns:sql="urn:schemas-microsoft-com:mapping-schema" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" &amp;gt;
  &amp;lt;xs:complexType name="PremiumReconType" &amp;gt;
    &amp;lt;xs:sequence&amp;gt;
      &amp;lt;xs:element minOccurs="1" maxOccurs="1" name="vendordetails" type="dateheader" /&amp;gt;
      &amp;lt;xs:element minOccurs="0" maxOccurs="unbounded" name="payment" type="paymentmade" /&amp;gt;
    &amp;lt;/xs:sequence&amp;gt;
  &amp;lt;/xs:complexType&amp;gt;
  &amp;lt;xs:complexType name="dateheader" &amp;gt;
    &amp;lt;xs:attribute name="datetime" type="xs:date" /&amp;gt;
  &amp;lt;/xs:complexType&amp;gt;
  &amp;lt;xs:complexType name="paymentmade" &amp;gt;
    &amp;lt;xs:attribute name="run_date" type="xs:date" /&amp;gt;
    &amp;lt;xs:attribute name="payroll_cycle" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="0" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="pay_eff_date" type="xs:date" /&amp;gt;
    &amp;lt;xs:attribute name="vendor_name" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="0" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
	&amp;lt;/xs:attribute&amp;gt;  
    &amp;lt;xs:attribute name="address_lines" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="0" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
	&amp;lt;/xs:attribute&amp;gt;  
    &amp;lt;xs:attribute name="vendor_city_state_zip" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="0" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
	&amp;lt;/xs:attribute&amp;gt;  
    &amp;lt;xs:attribute name="country" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="0" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
	&amp;lt;/xs:attribute&amp;gt;  
    &amp;lt;xs:attribute name="ssn" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="11" /&amp;gt;
          &amp;lt;xs:maxLength value="11" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
	  &amp;lt;xs:attribute name="FirstName" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="MiddleName" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="0" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="LastName" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="50" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="employer_num" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="4" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="vendor_code" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="10" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="status" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="20" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="ongoing" type="xs:decimal" /&amp;gt;
    &amp;lt;xs:attribute name="adjustment" type="xs:decimal" /&amp;gt;
    &amp;lt;xs:attribute name="funding_code" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:int"&amp;gt;
          &amp;lt;xs:totalDigits value="4" /&amp;gt;
          &amp;lt;xs:fractionDigits value="0" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="plan_name" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="plan_number" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
    &amp;lt;xs:attribute name="policy_number" &amp;gt;
      &amp;lt;xs:simpleType&amp;gt;
        &amp;lt;xs:restriction base="xs:string" &amp;gt;
          &amp;lt;xs:minLength value="1" /&amp;gt;
          &amp;lt;xs:maxLength value="30" /&amp;gt;
        &amp;lt;/xs:restriction&amp;gt;
      &amp;lt;/xs:simpleType&amp;gt;
    &amp;lt;/xs:attribute&amp;gt;
	&amp;lt;/xs:complexType&amp;gt;
  &amp;lt;xs:element name="vendordetails" type="PremiumReconType" /&amp;gt;
&amp;lt;/xs:schema&amp;gt;
&lt;/pre&gt;&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430408/430408/problems-with-activeworkbookxmlimport--importmap/</guid>
      <pubDate>Wed, 28 Nov 2012 15:36:21 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Excel VBA - Dynamically Adding a Page to a Multi-Page UserForm</title>
      <link>http://www.programmersheaven.com/mb/vba/430400/430400/excel-vba---dynamically-adding-a-page-to-a-multi-page-userform/</link>
      <description>I have a multi-page userform. Currently, it’s three pages. I need to create a field where the user can input a number and it will do the following:&lt;br /&gt;
&lt;br /&gt;
1.	Duplicate page 3 of the Multi-Page UserForm that many times.&lt;br /&gt;
2.	Duplicate the excel worksheet that same number of times.&lt;br /&gt;
&lt;br /&gt;
I have found the following code that works for part of Step 2. But, I still need to work out having it repeat as many times as requested by the user.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
Sub CopyWorksheet()
    Sheets("Candidate (1)").Select
    Sheets("Candidate").Copy After:=Sheets(Sheets.Count)
    Sheets("Values").Select
    Sheets("Values").Move After:=Sheets(Sheets.Count)
End Sub
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
I have found online the following code should duplicate a page, but it’s not working.&lt;br /&gt;
&lt;br /&gt;
&lt;pre class="sourcecode"&gt;
    Set M = IntvwWorksheet.Pages.Add("Candidate2", "Candidate 2", 4)
&lt;/pre&gt;&lt;br /&gt;
&lt;br /&gt;
Can someone please help me with this. I have nearly finished everything about this UserForm except this part and I desperately need to get it figured out.&lt;br /&gt;
&lt;br /&gt;
I appreciate your help!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430400/430400/excel-vba---dynamically-adding-a-page-to-a-multi-page-userform/</guid>
      <pubDate>Wed, 28 Nov 2012 08:18:02 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Bayser Consulting - Consultant position available (Excel/Access VBA)</title>
      <link>http://www.programmersheaven.com/mb/vba/430171/430171/bayser-consulting---consultant-position-available-excelaccess-vba/</link>
      <description>Ask yourself the following: &lt;br /&gt;
&lt;br /&gt;
1.	Do you have an analytical mind and feel you are not fully using your smarts to solve real-life problems?&lt;br /&gt;
&lt;br /&gt;
2.	Do you enjoy a fast-paced environment and feel energized when sharp colleagues poke holes in your claims?&lt;br /&gt;
&lt;br /&gt;
3.	Are you good with the computer and can do Excel/VBA, Access, and SAS in your dream?&lt;br /&gt;
&lt;br /&gt;
4.	Are you a good listener and does your response factor in  your audience’s position? &lt;br /&gt;
&lt;br /&gt;
5.	Are you articulate and put together presentations that register with the audience for clarity and logic? &lt;br /&gt;
&lt;br /&gt;
6.	Are you gung-ho on succeeding even though this means working very hard?&lt;br /&gt;
&lt;br /&gt;
7.	Does your long-term  vision take you in leadership position?&lt;br /&gt;
&lt;br /&gt;
8.	Are your personable and friendly? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you answered yes to all questions, you have the profile we are looking for immediate hire at a competitive salary and great healthcare coverage.&lt;br /&gt;
&lt;br /&gt;
If you happen to have a PhD in math, physics or engineering, you are even more interesting. Prior exposure to business/consulting (e.g. MBA) a plus.&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430171/430171/bayser-consulting---consultant-position-available-excelaccess-vba/</guid>
      <pubDate>Thu, 08 Nov 2012 13:35:40 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>Bayser Consulting - Consultant position available (Excel/Access VBA)</title>
      <link>http://www.programmersheaven.com/mb/vba/430170/430170/bayser-consulting---consultant-position-available-excelaccess-vba/</link>
      <description>Ask yourself the following: &lt;br /&gt;
&lt;br /&gt;
1.	Do you have an analytical mind and feel you are not fully using your smarts to solve real-life problems?&lt;br /&gt;
&lt;br /&gt;
2.	Do you enjoy a fast-paced environment and feel energized when sharp colleagues poke holes in your claims?&lt;br /&gt;
&lt;br /&gt;
3.	Are you good with the computer and can do Excel/VBA, Access, and SAS in your dream?&lt;br /&gt;
&lt;br /&gt;
4.	Are you a good listener and does your response factor in  your audience’s position? &lt;br /&gt;
&lt;br /&gt;
5.	Are you articulate and put together presentations that register with the audience for clarity and logic? &lt;br /&gt;
&lt;br /&gt;
6.	Are you gung-ho on succeeding even though this means working very hard?&lt;br /&gt;
&lt;br /&gt;
7.	Does your long-term  vision take you in leadership position?&lt;br /&gt;
&lt;br /&gt;
8.	Are your personable and friendly? &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
If you answered yes to all questions, you have the profile we are looking for immediate hire at a competitive salary and great healthcare coverage.&lt;br /&gt;
&lt;br /&gt;
If you happen to have a PhD in math, physics or engineering, you are even more interesting. Prior exposure to business/consulting (e.g. MBA) a plus.&lt;br /&gt;
&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430170/430170/bayser-consulting---consultant-position-available-excelaccess-vba/</guid>
      <pubDate>Thu, 08 Nov 2012 13:33:49 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>VBA Stop Cycle</title>
      <link>http://www.programmersheaven.com/mb/vba/430065/430065/vba-stop-cycle/</link>
      <description>I have a macro that does everything I need it to do (find a certain word, move the contents of that cell it to another cell, and keep searching for more).  However, I can't get it to stop (and move on to the next command).&lt;br /&gt;
&lt;br /&gt;
Here is what I have:&lt;br /&gt;
&lt;br /&gt;
' MOVE "Participant Name"&lt;br /&gt;
        Columns("C:C").Select&lt;br /&gt;
    Do&lt;br /&gt;
        Cells.Find(What:="Participant", After:=ActiveCell, LookIn:=xlFormulas, LookAt _&lt;br /&gt;
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _&lt;br /&gt;
            False, SearchFormat:=False).Activate&lt;br /&gt;
        With ActiveCell&lt;br /&gt;
        If .Column &amp;gt; 1 And .Row &amp;lt; Rows.Count Then&lt;br /&gt;
        .Cut Destination:=.Offset(3, -2)&lt;br /&gt;
        End If&lt;br /&gt;
        End With&lt;br /&gt;
    Loop Until IsEmpty(ActiveCell.Offset(0, 1))&lt;br /&gt;
&lt;br /&gt;
I'm sure it's obvious to you gurus, but I need your help!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430065/430065/vba-stop-cycle/</guid>
      <pubDate>Fri, 02 Nov 2012 11:02:54 -0700</pubDate>
      <category>VBA</category>
    </item>
    <item>
      <title>VBA Stop Cycle</title>
      <link>http://www.programmersheaven.com/mb/vba/430064/430064/vba-stop-cycle/</link>
      <description>I have a macro that does everything I need it to do (find a certain word, move the contents of that cell it to another cell, and keep searching for more).  However, I can't get it to stop (and move on to the next command).&lt;br /&gt;
&lt;br /&gt;
Here is what I have:&lt;br /&gt;
&lt;br /&gt;
' MOVE "Participant Name"&lt;br /&gt;
        Columns("C:C").Select&lt;br /&gt;
    Do&lt;br /&gt;
        Cells.Find(What:="Participant", After:=ActiveCell, LookIn:=xlFormulas, LookAt _&lt;br /&gt;
            :=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, MatchCase:= _&lt;br /&gt;
            False, SearchFormat:=False).Activate&lt;br /&gt;
        With ActiveCell&lt;br /&gt;
        If .Column &amp;gt; 1 And .Row &amp;lt; Rows.Count Then&lt;br /&gt;
        .Cut Destination:=.Offset(3, -2)&lt;br /&gt;
        End If&lt;br /&gt;
        End With&lt;br /&gt;
    Loop Until IsEmpty(ActiveCell.Offset(0, 1))&lt;br /&gt;
&lt;br /&gt;
I'm sure it's obvious to you gurus, but I need your help!&lt;br /&gt;</description>
      <guid isPermaLink="true">http://www.programmersheaven.com/mb/vba/430064/430064/vba-stop-cycle/</guid>
      <pubDate>Fri, 02 Nov 2012 11:01:04 -0700</pubDate>
      <category>VBA</category>
    </item>
  </channel>
</rss>