<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>p2p.wrox.com Forums - Excel VBA</title>
		<link>http://p2p.wrox.com</link>
		<description>Discuss using VBA for Excel programming.</description>
		<language>en</language>
		<lastBuildDate>Sun, 22 Nov 2009 00:25:05 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://p2p.wrox.com/images/misc/rss.jpg</url>
			<title>p2p.wrox.com Forums - Excel VBA</title>
			<link>http://p2p.wrox.com</link>
		</image>
		<item>
			<title>Personal.xlsb</title>
			<link>http://p2p.wrox.com/excel-vba/77105-personal-xlsb.html</link>
			<pubDate>Fri, 20 Nov 2009 15:09:39 GMT</pubDate>
			<description><![CDATA[I'm trying to record a macro in my Personal Macro Workbook so it is available on a global level, but whenever I try to save, it states "Personal...]]></description>
			<content:encoded><![CDATA[<div>I'm trying to record a macro in my Personal Macro Workbook so it is available on a global level, but whenever I try to save, it states &quot;Personal Macro Workbook in the startup folder must stay open for recording.  Unable to record.&quot;  Any ideas on how I can open it?  Thanks.</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>sirish</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/77105-personal-xlsb.html</guid>
		</item>
		<item>
			<title>Automate excel app</title>
			<link>http://p2p.wrox.com/excel-vba/77015-automate-excel-app.html</link>
			<pubDate>Fri, 13 Nov 2009 09:32:39 GMT</pubDate>
			<description>Hello all,

I am trying to automate excel application using rational robot. Because the rational robot not recognized the objects, I tried coding vba...</description>
			<content:encoded><![CDATA[<div>Hello all,<br />
<br />
I am trying to automate excel application using rational robot. Because the rational robot not recognized the objects, I tried coding vba so that I can use that code in robot.<br />
<br />
I have a window with username that I need to select and submit which does some process.<br />
<br />
I am able to call the menu item using the below code but once the window is displayed I cannot click the submit button.<br />
<br />
<br />
In vba.. after this code i.e once the window is displayed I cannot go for next line of code in debugging mode as well.<br />
<br />
Application.CommandBars(&quot;Worksheet Menu Bar&quot;).Controls(&quot;Data&quot;).Controls(&quot;Create Template&quot;).Execute<br />
<br />
Please help me out.<br />
<br />
<br />
<br />
<br />
This is the rational script code:<br />
<br />
    Dim objExcelApp as object<br />
<br />
    Set objExcelApp = CreateObject(&quot;Excel.Application&quot;)<br />
    objExcelApp.Visible = true<br />
    <br />
    objExcelApp.Workbooks.Open (&quot;F:\data development\Test Data Creation Tool\Test Data Creation Tool.xla&quot;)<br />
    objExcelApp.Application.CommandBars(&quot;Worksheet Menu Bar&quot;).Controls(&quot;Data&quot;).Controls(&quot;Create Template&quot;).Execute<br />
<br />
    Window SetContext, &quot;Caption=Create Template&quot;, &quot;&quot;<br />
    objExcelApp.Controls(&quot;Uname&quot;).Value=&quot;ADMIN&quot;<br />
<br />
<br />
Thanks,<br />
sanjay</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>sanjay13</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/77015-automate-excel-app.html</guid>
		</item>
		<item>
			<title>Automate excel app</title>
			<link>http://p2p.wrox.com/excel-vba/77014-automate-excel-app.html</link>
			<pubDate>Fri, 13 Nov 2009 09:32:39 GMT</pubDate>
			<description>Hello all,

I am trying to automate excel application using rational robot. Because the rational robot not recognized the objects, I tried coding vba...</description>
			<content:encoded><![CDATA[<div>Hello all,<br />
<br />
I am trying to automate excel application using rational robot. Because the rational robot not recognized the objects, I tried coding vba so that I can use that code in robot.<br />
<br />
I have a window with username that I need to select and submit which does some process.<br />
<br />
I am able to call the menu item using the below code but once the window is displayed I cannot click the submit button.<br />
<br />
<br />
In vba.. after this code i.e once the window is displayed I cannot go for next line of code in debugging mode as well.<br />
<br />
Application.CommandBars(&quot;Worksheet Menu Bar&quot;).Controls(&quot;Data&quot;).Controls(&quot;Create Template&quot;).Execute<br />
<br />
Please help me out.<br />
<br />
<br />
<br />
<br />
This is the rational script code:<br />
<br />
    Dim objExcelApp as object<br />
<br />
    Set objExcelApp = CreateObject(&quot;Excel.Application&quot;)<br />
    objExcelApp.Visible = true<br />
    <br />
    objExcelApp.Workbooks.Open (&quot;F:\data development\Test Data Creation Tool\Test Data Creation Tool.xla&quot;)<br />
    objExcelApp.Application.CommandBars(&quot;Worksheet Menu Bar&quot;).Controls(&quot;Data&quot;).Controls(&quot;Create Template&quot;).Execute<br />
<br />
    Window SetContext, &quot;Caption=Create Template&quot;, &quot;&quot;<br />
    objExcelApp.Controls(&quot;Uname&quot;).Value=&quot;ADMIN&quot;<br />
<br />
<br />
Thanks,<br />
sanjay</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>sanjay13</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/77014-automate-excel-app.html</guid>
		</item>
		<item>
			<title>create and run .bat file</title>
			<link>http://p2p.wrox.com/excel-vba/76953-create-run-bat-file.html</link>
			<pubDate>Sun, 08 Nov 2009 18:11:07 GMT</pubDate>
			<description>hi..

I need help with a macro in excel which should be able to create and execute a bat file when opened..

the file can just have for example a...</description>
			<content:encoded><![CDATA[<div>hi..<br />
<br />
I need help with a macro in excel which should be able to create and execute a bat file when opened..<br />
<br />
the file can just have for example a command to launch notepad or the time..<br />
<br />
the objective is basically to check the scurity problems with excel, pdf.. etc..<br />
if you guys have any other ideas in which we can execute code using popular softwares without being detected by anti virus.. chip in your ideas..<br />
<br />
thanx a lot :)</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>richurules</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76953-create-run-bat-file.html</guid>
		</item>
		<item>
			<title>Excel vba: data processing</title>
			<link>http://p2p.wrox.com/excel-vba/76927-excel-vba-data-processing.html</link>
			<pubDate>Fri, 06 Nov 2009 07:38:39 GMT</pubDate>
			<description><![CDATA[I'd like to use vba to process a large data set[:confused:], from cell A1 to L60000, my problem is: i hope to remove irrelevant record with some...]]></description>
			<content:encoded><![CDATA[<div>I'd like to use vba to process a large data set[:confused:], from cell A1 to L60000, my problem is: i hope to remove irrelevant record with some criteria:<br />
<ol style="list-style-type: decimal"><li>weekday(column b)&gt;5 : remove</li>
<li>vlookup to another file for the group</li>
<li>for group A &amp; C, if not 9am&lt;time value in column c&lt; 5pm : remove</li>
<li>for group B, if not 9am&lt;time value in column c&lt; 6pm : remove</li>
</ol><br />
<div style="margin:20px; margin-top:5px; ">
	<div class="smallfont" style="margin-bottom:2px">Quote:</div>
	<table cellpadding="6" cellspacing="0" border="0" width="100%">
	<tr>
		<td class="alt2">
			<hr />
			
				Sub Comm_prepare_data()<br />
    Range(&quot;m1&quot;) = &quot;Weekday&quot;<br />
     <br />
    Range(&quot;m2&quot;) = &quot;=weekday(b2,2)&quot;<br />
    Range(&quot;M2&quot;).AutoFill Destination:=Range(&quot;M2&quot;)<br />
    <br />
    For Each Data In Worksheets(&quot;Sheet1&quot;).Range(&quot;m2:$0&quot;).Cells<br />
        If (Data.Value) &gt; 5 Then ???<br />
    Next
			
			<hr />
		</td>
	</tr>
	</table>
</div>What should i do??[:confused:]</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>snowman.hk</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76927-excel-vba-data-processing.html</guid>
		</item>
		<item>
			<title>Compare pivot table columns</title>
			<link>http://p2p.wrox.com/excel-vba/76781-compare-pivot-table-columns.html</link>
			<pubDate>Tue, 27 Oct 2009 07:49:34 GMT</pubDate>
			<description><![CDATA[Hi,

I'm new to VBA.
Anyone can help? my logic is this, read Column1 Row 5 & 6, if Column1 row 5 & 6 cells is indentical, next will compare Column2...]]></description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I'm new to VBA.<br />
Anyone can help? my logic is this, read Column1 Row 5 &amp; 6, if Column1 row 5 &amp; 6 cells is indentical, next will compare Column2 Row 5 &amp; 6.If Column2 row 5 &amp; 6 cells contain different value, Column1 row 5 &amp; 6 will split out with _01 and _02. IF Column2 row 5 &amp; 6 cells is indentical, Column1 row 5 &amp; 6 remain the same. No split.</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>waka</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76781-compare-pivot-table-columns.html</guid>
		</item>
		<item>
			<title>Copy and Paste the value</title>
			<link>http://p2p.wrox.com/excel-vba/76760-copy-paste-value.html</link>
			<pubDate>Mon, 26 Oct 2009 09:14:53 GMT</pubDate>
			<description>Hi,

anyone can help ? i got this issue regarding copy from formulas and paste the value in new worksheet. i manage to copy and paste over but my...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
anyone can help ? i got this issue regarding copy from formulas and paste the value in new worksheet. i manage to copy and paste over but my middle three rows only show 0. any idea why is it like that?[:confused:]<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">With Sheets(&quot;Forecast&quot;)<br />
&nbsp; &nbsp; &nbsp; &nbsp; .Range(.Range(&quot;BL5:BL92&quot;), .Range(&quot;BP5:BP94&quot;).End(xlUp)).Copy<br />
&nbsp; &nbsp; End With<br />
&nbsp; &nbsp; Sheets(&quot;Template&quot;).[A65536].End(xlUp)(1).PasteSpecial Paste:=xlValues</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>waka</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76760-copy-paste-value.html</guid>
		</item>
		<item>
			<title>#NAME? error running Excel 2003 VBA in Excel 2007</title>
			<link>http://p2p.wrox.com/excel-vba/76743-name-error-running-excel-2003-vba-excel-2007-a.html</link>
			<pubDate>Sat, 24 Oct 2009 12:47:49 GMT</pubDate>
			<description>Hi,

I made a spreadsheet in XL03 but the VBA functions will not calculate in XL07!

I have saved it as macro enabled, the module exists, the...</description>
			<content:encoded><![CDATA[<div>Hi,<br />
<br />
I made a spreadsheet in XL03 but the VBA functions will not calculate in XL07!<br />
<br />
I have saved it as macro enabled, the module exists, the functions appear in the fx dropdown list as I type!<br />
<br />
I have set the &quot;Trust Center&quot; options in various ways but can not get rid of the error.<br />
<br />
<br />
One of my functions:-<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Function timval(tim_str As String) As Single<br />
<br />
Dim hrh As Single<br />
Dim minh As Single<br />
<br />
hrh = 1 / 24<br />
minh = hrh / 60<br />
<br />
Dim hr_st As String<br />
Dim min_st As String<br />
Dim hr As Single<br />
Dim min As Single<br />
<br />
' extract hours and minutes from string<br />
hr_st = Mid(tim_str, 1, 2)<br />
min_st = Mid(tim_str, 4, 2)<br />
<br />
' convert to numeric<br />
If IsNumeric(hr_st) Then<br />
&nbsp; &nbsp; hr = hr_st<br />
Else<br />
&nbsp; &nbsp; hr = 0<br />
End If<br />
&nbsp; &nbsp; <br />
If IsNumeric(min_st) Then<br />
&nbsp; &nbsp; min = min_st<br />
Else<br />
&nbsp; &nbsp; min = 0<br />
End If<br />
<br />
' calculate time value in excel format<br />
timval = (hr * hrh) + (min * minh)<br />
<br />
End Function</code><hr />
</div>Hope someone can help.<br />
<br />
Thanks<br />
Steve</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>steveburn</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76743-name-error-running-excel-2003-vba-excel-2007-a.html</guid>
		</item>
		<item>
			<title>Excel 2007 VBA UDF problem</title>
			<link>http://p2p.wrox.com/excel-vba/76741-excel-2007-vba-udf-problem.html</link>
			<pubDate>Sat, 24 Oct 2009 07:55:06 GMT</pubDate>
			<description><![CDATA[Hi, i'm new to Excel VBA.  I'm trying to create the same UDF as the centigrade to fahrenheit one.  Tried to create a new one with same structure as...]]></description>
			<content:encoded><![CDATA[<div>Hi, i'm new to Excel VBA.  I'm trying to create the same UDF as the centigrade to fahrenheit one.  Tried to create a new one with same structure as the sample code, just different naming, but the result is zeros for every value of C.  Could anyone help? [:(]<br />
<br />
<div style="margin:20px; margin-top:5px">
	<div class="smallfont" style="margin-bottom:2px">Code:</div>
	<hr /><code style="margin:0px" dir="ltr" style="text-align:left">Function CtoF(degreeC)<br />
&nbsp; &nbsp; degreeCtoF = degreeC * 9 / 5 + 32<br />
End Function</code><hr />
</div></div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>snowman.hk</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76741-excel-2007-vba-udf-problem.html</guid>
		</item>
		<item>
			<title>Application to run excel vba macro</title>
			<link>http://p2p.wrox.com/excel-vba/76734-application-run-excel-vba-macro.html</link>
			<pubDate>Fri, 23 Oct 2009 18:26:09 GMT</pubDate>
			<description>Hello,

I am trying to create an application that looks like this: 
http://img406.imageshack.us/img406/7015/picture2so.jpg

So, this is going to be a...</description>
			<content:encoded><![CDATA[<div>Hello,<br />
<br />
I am trying to create an application that looks like this: <br />
<a href="http://img406.imageshack.us/img406/7015/picture2so.jpg" target="_blank">http://img406.imageshack.us/img406/7015/picture2so.jpg</a><br />
<br />
So, this is going to be a .exe application that will allow the users to browse for an excel worksheet and with the click of the &quot;Format!&quot; button, it will run the excel vba macro that I have made. What is the best way of doing this? Thanks!</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>dyung2</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76734-application-run-excel-vba-macro.html</guid>
		</item>
		<item>
			<title>How to read Columns ?</title>
			<link>http://p2p.wrox.com/excel-vba/76720-how-read-columns.html</link>
			<pubDate>Fri, 23 Oct 2009 07:08:52 GMT</pubDate>
			<description><![CDATA[hi,

anyone know how to code to create a new worksheet?
i only manage to read row didn't manage to read column.
i would like to read my sheet1...]]></description>
			<content:encoded><![CDATA[<div>hi,<br />
<br />
anyone know how to code to create a new worksheet?<br />
i only manage to read row didn't manage to read column.<br />
i would like to read my sheet1 column5 to 7 and copy it to a new worksheet.</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>waka</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76720-how-read-columns.html</guid>
		</item>
		<item>
			<title><![CDATA[Need code corrections  "get sub or function not defined" error"]]></title>
			<link>http://p2p.wrox.com/excel-vba/76716-need-code-corrections-get-sub-function-not-defined-error.html</link>
			<pubDate>Fri, 23 Oct 2009 01:43:27 GMT</pubDate>
			<description><![CDATA[It's suppose to check in col "f" and "G" for duplicates. I get a "sub or Function not defined" error. Thanks

Sub checkfordups()

Dim LLoop As...]]></description>
			<content:encoded><![CDATA[<div>It's suppose to check in col &quot;f&quot; and &quot;G&quot; for duplicates. I get a &quot;sub or Function not defined&quot; error. Thanks<br />
<br />
Sub checkfordups()<br />
<br />
Dim LLoop As Integer<br />
Dim LTestLoop As Integer<br />
Dim LClearRange As String<br />
<br />
Dim Lrows As Integer<br />
Dim LRange As String<br />
<br />
       'Column F values    <br />
Dim LChangedValue As String<br />
Dim LTestValue As String<br />
  <br />
           'Column G values    <br />
Dim LChangedValueG As String<br />
Dim LTestValueG As String<br />
<br />
   <br />
              'Test the first 200 rows<br />
Lrows = 200<br />
LLoop = 2<br />
             'Clear colors<br />
LClearRange = &quot;F2:G&quot; &amp; Lrows<br />
Range(LClearRange).Interior.ColorIndex = xlNone<br />
             'Check first 200 rows<br />
While LLoop &lt;= Lrows<br />
     LChangedValue = &quot;F&quot; &amp; CStr(LLoop)<br />
     LChangedValueG = &quot;G&quot; &amp; CStr(LLoop)<br />
   If Len(Range(LChangedValue).Value) &gt; 0 Then<br />
               'test each value for uniqueness<br />
       LTestLoop = 2<br />
      While LTestLoop &lt;= Lrows<br />
         If LLoop &lt;&gt; LTestLoop Then<br />
             LTestValue = &quot;F&quot; &amp; CStr(LTestLoop)<br />
             LTestValueG = &quot;G&quot; &amp; CStr(LTestLoop)<br />
                  'value has been duplicated in another cell<br />
          If (Range(LChangedValue).Value = Range(LTestValue).Value) And (Range(LChangedValueG).Value = Range(LTestValueG).Value) Then<br />
                  'set color to red in column F<br />
            Range(LChangedValue).Interior.ColorIndex = 3<br />
            Range(LTestValue).Interior.ColorIndex = 3<br />
                 ' set color to red in column G<br />
            Range(LChangedValueG).Interior.ColorIndex = 3<br />
            Range(LTestValueG).Interior.ColorIndex = 3<br />
          End If<br />
        End If<br />
        LTestLoop = LTestLoop + 1<br />
     Wend<br />
<br />
  End If<br />
   LLoop = LLoop + 1<br />
Wend<br />
<br />
<br />
End Sub</div>

]]></content:encoded>
			<category domain="http://p2p.wrox.com/excel-vba-79/">Excel VBA</category>
			<dc:creator>bluesboytoo</dc:creator>
			<guid isPermaLink="true">http://p2p.wrox.com/excel-vba/76716-need-code-corrections-get-sub-function-not-defined-error.html</guid>
		</item>
	</channel>
</rss>
