<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"
    xmlns:dc="http://purl.org/dc/elements/1.1/"
     xmlns:admin="http://webns.net/mvcb/"
     xmlns:content="http://purl.org/rss/1.0/modules/content/"
     xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
	<channel>
	  <title>Ask MetaFilter questions tagged with vba</title>
      <link>http://ask.metafilter.com/tags/vba</link>
      <description>Questions tagged with 'vba' at Ask MetaFilter.</description>
	  <pubDate>Mon, 13 May 2013 13:47:58 -0800</pubDate> <lastBuildDate>Mon, 13 May 2013 13:47:58 -0800</lastBuildDate>

      <language>en-us</language>
	  <docs>http://blogs.law.harvard.edu/tech/rss</docs>
	  <ttl>60</ttl>	  
	<item>
	<title>Outlook and VBA</title>
	<link>http://ask.metafilter.com/240903/Outlook%2Dand%2DVBA</link>	
	<description>How to make Outlook automatically change the &quot;From:&quot; field when replying to certain emails? I receive email sent to two email addresses; we will call them personal@ and support@. The personal@ email is my primary address, the support@ just gets forwarded to me, so all emails sent to both addresses go into one Inbox (though I sort the support@ emails into their own folder automatically).&lt;br&gt;
&lt;br&gt;
Here is the issue. The support@ emails are from users trying to get help, and when I reply to them I don&apos;t want it come from My Name (personal@), I would like it to show up as coming from Product Support (support@). Looking around, it seems the only way to do this is with VBA, but I have been unable to find the proper resources to do it on my own (I have no VBA or really programming experience; I did find a snippet of code but was unable to find how to actually make it do anything).&lt;br&gt;
&lt;br&gt;
I am using Outlook 2007. I would also like to have a separate signature go with these emails, but that seems fairly easily remedied, either manually or via a signature picker (though handling that automatically would be a great bonus); the changing email address/sender does not seem so easily dealt with. How would one accomplish this?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2013:site.240903</guid>
	<pubDate>Mon, 13 May 2013 13:47:58 -0800</pubDate>
	<category>email</category>
	<category>outlook</category>
	<category>programming</category>
	<category>resolved</category>
	<category>vba</category>
	<dc:creator>Steely-eyed Missile Man</dc:creator>
	</item>
	<item>
	<title>Assigning a keyboard shortcut to a macro in Access 2007</title>
	<link>http://ask.metafilter.com/240743/Assigning%2Da%2Dkeyboard%2Dshortcut%2Dto%2Da%2Dmacro%2Din%2DAccess%2D2007</link>	
	<description>Is there a simple way to assign a keyboard shortcut to a macro in Access 2007? I understand that macros behave differently in Access than they do in Excel (which I&apos;m more familiar with). I have written a sub called &quot;ImportAll&quot; in Module1. I&apos;d like it to run when I push Ctrl+I. How would I go about achieving this?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2013:site.240743</guid>
	<pubDate>Fri, 10 May 2013 10:15:42 -0800</pubDate>
	<category>access</category>
	<category>macro</category>
	<category>shortcut</category>
	<category>vba</category>
	<dc:creator>Proginoskes</dc:creator>
	</item>
	<item>
	<title>PowerPoint 2010, VBA to copy or create command buttons</title>
	<link>http://ask.metafilter.com/240373/PowerPoint%2D2010%2DVBA%2Dto%2Dcopy%2Dor%2Dcreate%2Dcommand%2Dbuttons</link>	
	<description>I need a macro to check each slide for the existence of several command buttons, and then copy/create them (along with the code behind them) on slides where they&apos;re not found. I&apos;ve tried using the object browser to find the objects/methods to use but, not being very familiar with programming/coding, I haven&apos;t been able to figure out how to do it. 

I tried using a master slide but ran into problems (discussed here: &lt;a href=&quot;http://www.utteraccess.com/forum/VBA-Import-Slides-Pl-t2002862.html&amp;pid=2355756#entry2355756&quot;&gt;http://www.utteraccess.com/forum/VBA-Import-Slides-Pl-t2002862.html&amp;amp;pid=2355756#entry2355756&lt;/a&gt;), but I really need this soon and I&apos;d be happy to run this macro manually whenever I add/import slides.

Thanks for your help.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2013:site.240373</guid>
	<pubDate>Sat, 04 May 2013 16:36:43 -0800</pubDate>
	<category>powerpoint</category>
	<category>vba</category>
	<dc:creator>atm</dc:creator>
	</item>
	<item>
	<title>Learning to use VBA</title>
	<link>http://ask.metafilter.com/238667/Learning%2Dto%2Duse%2DVBA</link>	
	<description>I have read that John Walkenbach&apos;s books are the de-facto standard for learning to use VBA in Microsoft Excel. I&apos;d like to know what books are recommended to learn to use vba in other Office products - primarily Access, but also Word and Powerpoint. I&apos;m more interested in books than in websites.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2013:site.238667</guid>
	<pubDate>Sat, 06 Apr 2013 21:31:13 -0800</pubDate>
	<category>access</category>
	<category>microsoft</category>
	<category>office</category>
	<category>powerpoint</category>
	<category>vba</category>
	<category>word</category>
	<dc:creator>Proginoskes</dc:creator>
	</item>
	<item>
	<title>How can I get access to readyState 3 with VBA &quot;AJAX&quot;?</title>
	<link>http://ask.metafilter.com/232710/How%2Dcan%2DI%2Dget%2Daccess%2Dto%2DreadyState%2D3%2Dwith%2DVBA%2DAJAX</link>	
	<description>I&apos;m writing some VBA code (in Excel) which uses a reference to &lt;code&gt;Microsoft XML, v6.0&lt;/code&gt;, and creates a &lt;code&gt;MSXML2.XMLHTTP&lt;/code&gt; object.
I used the &lt;code&gt;clsXMLHttpMonitor&lt;/code&gt; example from &lt;a href=&quot;http://www.tushar-mehta.com/publish_train/xl_vba_cases/vba_web_pages_services/index.htm&quot;&gt;this page&lt;/a&gt; as a starting-off point.
How can I access the response text when readyState = 3? The example works fine for smallish requests.&lt;br&gt;
But when the response is sufficiently large, Excel will freeze up into a &quot;(Not Responding)&quot; state and sometimes come back and sometimes seem to hang forever.&lt;br&gt;
&lt;br&gt;
I know about readyState 3, but when I check for it, it seems that &lt;code&gt;responseStream&lt;/code&gt; is either empty or &quot;non-readable&quot;.&lt;br&gt;
&lt;br&gt;
Is there something I am missing about how to get access to the stream of data as it arrives with this object?&lt;br&gt;
&lt;br&gt;
&lt;i&gt;&lt;b&gt;&lt;u&gt;OR...&lt;/u&gt;&lt;/b&gt;&lt;/i&gt;&lt;br&gt;
&lt;br&gt;
Is there an alternative object I can use from within VBA to accomplish the desired result?&lt;br&gt;
Preferably with code examples?&lt;br&gt;
&lt;br&gt;
My stackexchange-fu has failed on this one; my similar question there has been met with silence.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2013:site.232710</guid>
	<pubDate>Tue, 08 Jan 2013 10:35:51 -0800</pubDate>
	<category>ajax</category>
	<category>excel</category>
	<category>msxml2</category>
	<category>OnReadyStateChange</category>
	<category>resolved</category>
	<category>vba</category>
	<dc:creator>jozxyqk</dc:creator>
	</item>
	<item>
	<title>Help this Mac user learn PC software for job hunt</title>
	<link>http://ask.metafilter.com/221895/Help%2Dthis%2DMac%2Duser%2Dlearn%2DPC%2Dsoftware%2Dfor%2Djob%2Dhunt</link>	
	<description>How can I improve my computer skills for job hunt when I use a Mac and the software is for PC? I recently posted about my career conundrum, and got some great advice. &lt;br&gt;
&lt;br&gt;
I met with a career counselor today who will help me with my resume, and formatting towards the type of jobs we think would suit -- primarily Sales Operations/Analyst positions. &lt;br&gt;
&lt;br&gt;
He suggested I take classes to brush up on my Excel (I self-taught a lot for my MBA program, but I used Office 2008 for Mac), learn SQL querying and VBA. &lt;br&gt;
&lt;br&gt;
What is the best way for me to learn these things? I&apos;m having a hard time finding classes and would prefer to learn online, but without a PC I&apos;m not sure if that is possible. &lt;br&gt;
&lt;br&gt;
I am in Austin, TX. &lt;br&gt;
&lt;br&gt;
Thanks in advance and I appreciate any help or resources you can suggest.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2012:site.221895</guid>
	<pubDate>Thu, 09 Aug 2012 16:25:42 -0800</pubDate>
	<category>excel</category>
	<category>office</category>
	<category>resolved</category>
	<category>sql</category>
	<category>vba</category>
	<category>work</category>
	<dc:creator>hrj</dc:creator>
	</item>
	<item>
	<title>How to automate a dynamic web page using VBA?</title>
	<link>http://ask.metafilter.com/214902/How%2Dto%2Dautomate%2Da%2Ddynamic%2Dweb%2Dpage%2Dusing%2DVBA</link>	
	<description>Help me automate some of my work involving taking values in a spreadsheet and plugging them into a website with dynamically generated content. I need someone to point me in the right direction. I have several tasks which are very mechanical which I would like to automate. One, for instance, involves taking a list of product numbers from a spreadsheet, entering them one at a time to a website, then printing the resulting page. &lt;br&gt;
&lt;br&gt;
I have tried to automate this via VBA, and I can get as far as loading the page and entering the product number into the correct form field, but there is actually a step before this where a drop down needs to be selected before the product number field is active. I am actually able to set the value of this drop down, but doing this doesn&apos;t cause the page&apos;s javascript to enable the product number field and product number submit button which then ignores my attempt to programatically click it.&lt;br&gt;
&lt;br&gt;
Basically the page I want to use is dynamically generated, but the parts I want don&apos;t show up until after the necessary info has been entered, and I can&apos;t get the page to recognize that I&apos;ve automatically entered it. Further complicating the situation is that the web page I&apos;m working with is generated by ASP (I think) which I&apos;m not familiar with and which is inserting a lot of strange script tags with long strings of encoded data.&lt;br&gt;
&lt;br&gt;
Any help or pointers in the right direction would be greatly appreciated.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2012:site.214902</guid>
	<pubDate>Wed, 09 May 2012 10:32:08 -0800</pubDate>
	<category>ajax</category>
	<category>automation</category>
	<category>vba</category>
	<category>webpage</category>
	<dc:creator>Reverend John</dc:creator>
	</item>
	<item>
	<title>Method Range of Object Global failed</title>
	<link>http://ask.metafilter.com/214339/Method%2DRange%2Dof%2DObject%2DGlobal%2Dfailed</link>	
	<description>I&apos;m starting to write some Excel-VBA Macros, but it seems I don&apos;t get some basic things. I tried this simple code: Sub Macro1()&lt;br&gt;
&lt;br&gt;
    Dim MyRange As Range&lt;br&gt;
    &lt;br&gt;
    Set MyRange = Worksheets(&quot;Sheet1&quot;).Range(&quot;A1&quot;)&lt;br&gt;
    MsgBox (MyRange)&lt;br&gt;
    &apos;MyRange.Copy&lt;br&gt;
    Range(&quot;MyRange&quot;).Copy&lt;br&gt;
    &lt;br&gt;
    Range(&quot;A2&quot;).Select&lt;br&gt;
    ActiveSheet.Paste&lt;br&gt;
    &lt;br&gt;
End Sub&lt;br&gt;
&lt;br&gt;
It displays the content of the cell and copies it with MyRange.Copy, however if I use Range(&quot;MyRange&quot;).Copy instead I get a Method Range of Object Global failed. Why is this so?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2012:site.214339</guid>
	<pubDate>Wed, 02 May 2012 03:49:09 -0800</pubDate>
	<category>Excel</category>
	<category>VBA</category>
	<dc:creator>SweetLiesOfBokonon</dc:creator>
	</item>
	<item>
	<title>Need VBA help to refresh and save worksheet.</title>
	<link>http://ask.metafilter.com/213546/Need%2DVBA%2Dhelp%2Dto%2Drefresh%2Dand%2Dsave%2Dworksheet</link>	
	<description>Have Excel 2007.  I would like to have a spreadsheet perform the following simple? tasks * At 6:30 AM run a Macro&lt;br&gt;
* At 6:31 AM run another Marco&lt;br&gt;
* After 6:31 Macro is done running,  Save the Worksheet as xxxx. YYYYMMDDhhmmss&lt;br&gt;
* After the worksheet saves, I want cell C2 to list Date and time of last saved.&lt;br&gt;
&lt;br&gt;
I think I have most of the code already, you can view it here in &lt;a href=&quot;http://pastebin.com/uB86rJAP&quot;&gt;pastebin&lt;/a&gt;.&lt;br&gt;
&lt;br&gt;
Right now its all separate components.  I&apos;m not sure how to make it flow.  Any VBA magicians out there that can help solve my riddle?&lt;br&gt;
&lt;br&gt;
Thanks!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2012:site.213546</guid>
	<pubDate>Sun, 22 Apr 2012 12:37:18 -0800</pubDate>
	<category>Excel</category>
	<category>Marco</category>
	<category>VBA</category>
	<dc:creator>bleucube</dc:creator>
	</item>
	<item>
	<title>Please use small words not written in VBA</title>
	<link>http://ask.metafilter.com/208459/Please%2Duse%2Dsmall%2Dwords%2Dnot%2Dwritten%2Din%2DVBA</link>	
	<description>Conditional Images in Word.  It must be possible, but how hard is it, and am I just looking in all the wrong places for an answer? I&apos;ve been set the task of creating a document with basic text &quot;blah blah blah&quot; set side-by-side with an image.  However, the people writing the text sometimes need the image to be black and white, and sometimes need it to be a color version. They do not want two separate documents. Instead, they want a single document, with a macro, or another &lt;i&gt;(extremely simple)&lt;/i&gt; method that let&apos;s them switch out the image at will, so that they don&apos;t have to keep re-editing the text in two documents.  &lt;br&gt;
&lt;br&gt;
I have some working knowledge of macros, and have made fill-in forms, and done some basic tweaking of VBA before.  I have an old outdated copy of O&apos;Reilly&apos;s Writing Word Macros sitting next to me. I&apos;ve also spent way too much time this week searching for an answer to this.&lt;br&gt;
&lt;br&gt;
I found this &lt;a href=&quot;http://www.wordtipsandtricks.com/templates/how-to-create-conditional-images-in-microsoft-word/1417/&quot;&gt;Word Tips and Tricks&lt;/a&gt; page, which seemed to be really on point. However, they&apos;ve either glossed over quite a few steps, or it&apos;s simply inaccurate.  I cannot get it to work.&lt;br&gt;
&lt;br&gt;
I also found this &lt;a href=&quot;http://www.abelard.com.au/words-3-2.pdf&quot;&gt; incredibly useful article on conditional text&lt;/a&gt; &lt;b&gt;(warning, links to a pdf file)&lt;/b&gt;, which was even better, and which taught me all about how to create multiple versions of user guides, text books, etc, in a single document.  It even included the code to cut and paste into the vba editor in a nice text attachment.  It looked like it was going to be exactly what I needed, and I got it working with text, no problem.&lt;br&gt;
&lt;br&gt;
At the end of the article it states that you can use the &quot;tagging&quot; strategy taught by the article for other elements than text, such as a table, row, or column, anything under a selected heading, or a specified combination of styles or font colors.&lt;br&gt;
&lt;br&gt;
This is where things break down.  I have not been able to tag just an image unless I set it to be in-line with the text (not desired), or also grab surrounding paragraph marks. I tried placing the image and text in a table, but although I can tag the contents of a table, the table itself remains (empty, and sucking up space).  I tried creating two alternate sections of text plus duplicate image, but could not find a way to tag the section.  Nor could I find a way to set the macro to a style. I have come very, very close to getting it to work, but because of the way I&apos;m grabbing the paragraphs, things become misaligned, the wrong image vanishes and doesn&apos;t come back, the formatting goes off...&lt;br&gt;
&lt;br&gt;
I feel like I&apos;m close, but I am in that frustrating place where you know enough to understand just how much you don&apos;t know.  Is it that I need to have a much more in-depth understanding of VBA to pull this off (in which case, it&apos;s probably time for me to move on) or am I missing something basic?  Is there a useful site out there that could fill in some of what I&apos;m missing?&lt;br&gt;
&lt;br&gt;
&lt;/b&gt;&lt;/b&gt;</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2012:site.208459</guid>
	<pubDate>Fri, 17 Feb 2012 11:58:44 -0800</pubDate>
	<category>conditionalimages</category>
	<category>conditionaltext</category>
	<category>macros</category>
	<category>resolved</category>
	<category>vba</category>
	<category>word</category>
	<category>word2010</category>
	<dc:creator>instead of three wishes</dc:creator>
	</item>
	<item>
	<title>How do I set up Auto BCC on a single Exchange account out of three, in Outlook 2010?</title>
	<link>http://ask.metafilter.com/204676/How%2Ddo%2DI%2Dset%2Dup%2DAuto%2DBCC%2Don%2Da%2Dsingle%2DExchange%2Daccount%2Dout%2Dof%2Dthree%2Din%2DOutlook%2D2010</link>	
	<description>I need to Auto BCC myself on all mail I &lt;strong&gt;send&lt;/strong&gt; through Outlook 2010 from one (and only one) of my Exchange accounts. How can I do this? Details: &lt;br&gt;
&lt;br&gt;
I have 3 exchange accounts connected to Microsoft Outlook 2010. They are hosted with GoDaddy. &lt;em&gt;(Changing hosts is not under my control. Please do not suggest I do so.)&lt;/em&gt; I&apos;m sharing one of the exchange accounts with multiple people.&lt;br&gt;
&lt;br&gt;
I need to set up a rule for the shared Exchange account, that will automatically BCC itself on any email sent.  &lt;br&gt;
&lt;br&gt;
I know this can be done as a server side transport rule. However, GoDaddy does not give access to the Exchange Management Console. So that&apos;s not possible. &lt;br&gt;
&lt;br&gt;
I found &lt;a href=&quot;http://www.groovypost.com/howto/microsoft/how-to-automatically-bcc-in-outlook-2010/&quot;&gt;this site&lt;/a&gt; which gives clear instructions on how to set up an auto bcc. But the rule is:&lt;br&gt;
&lt;br&gt;
a) not restricted to one exchange account. It affects all emails being sent through Outlook. &lt;br&gt;
b) Only lasts through the current outlook session. When I reboot my computer, it disappears. I need it to be a permanent rule. Do I need to digitally sign the macro? If so, how do I do that?&lt;br&gt;
&lt;br&gt;
Thanks in advance for any help you might be able to give.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2012:site.204676</guid>
	<pubDate>Mon, 02 Jan 2012 16:48:27 -0800</pubDate>
	<category>autobcc</category>
	<category>email</category>
	<category>exchange</category>
	<category>help</category>
	<category>macro</category>
	<category>microsoft</category>
	<category>outlook</category>
	<category>vba</category>
	<dc:creator>zarq</dc:creator>
	</item>
	<item>
	<title>Excel Macros For Dummies</title>
	<link>http://ask.metafilter.com/202237/Excel%2DMacros%2DFor%2DDummies</link>	
	<description>Explain to me Excel macros and how I can learn to program them (assume that I know absolutely nothing, because that would be correct). A few years ago, I had a boss that was an Excel macro genius. I did photo keyword tagging for him, which was very data entry heavy. He was able to program information that had been inputted into one part of a spreadsheet to automatically repeat in other parts of the spreadsheet; it was also color-coded.  &lt;br&gt;
&lt;br&gt;
This was the first time that I&apos;d ever seen Excel macros used, and I thought it was amazing. However, I haven&apos;t been in an environment since where I&apos;ve had the opportunity to see this in action again, or even known other people who were able to program Excel macros.&lt;br&gt;
&lt;br&gt;
Still, it&apos;s dawned on me that this is a very useful skill. However, it looks quite intimidating, and I&apos;m not even sure about what you would use them for beyond data entry. Hive mind, could you please explain to me what Excel macros might be used for, and perhaps good tutorials so that I can try my hand at it?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2011:site.202237</guid>
	<pubDate>Wed, 30 Nov 2011 14:23:11 -0800</pubDate>
	<category>excel</category>
	<category>excelmacro</category>
	<category>macro</category>
	<category>programming</category>
	<category>vba</category>
	<dc:creator>so much modern time</dc:creator>
	</item>
	<item>
	<title>Best practice in implementing a two-part unique identifier?</title>
	<link>http://ask.metafilter.com/185400/Best%2Dpractice%2Din%2Dimplementing%2Da%2Dtwopart%2Dunique%2Didentifier</link>	
	<description>Best way to implement a two-part unique identifier in Access? I&apos;ve been tasked with building a solution that involves items with a two-part identifier that must be unique.  Imagine the identifiers as letters and numbers.  Each part can have multiple entries with the same values, but when put together, they must be unique.&lt;br&gt;
&lt;br&gt;
AA01&lt;br&gt;
AA02&lt;br&gt;
BB01&lt;br&gt;
BB02&lt;br&gt;
etc.&lt;br&gt;
&lt;br&gt;
I could make [LetterPart] and [NumberPart] together the primary key for the table.  But I&apos;d love to have a primary key that is just one entry, and still have the database reject any attempt to insert a non-unique [LetterPart] and [NumberPart] pair.&lt;br&gt;
&lt;br&gt;
I&apos;d also love for a way to have the database automatically increase the number part in a way that is aware of the letter part, so I don&apos;t have to do it in code.  So I could tell it to Insert new AA, and it looks at the AA entries, sees the last one was 02, and creates AA03.  Then when I tell it to insert CC, for example, it creats CC01.&lt;br&gt;
&lt;br&gt;
Are these things possible?  What are the known, sane approaches to this problem?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2011:site.185400</guid>
	<pubDate>Mon, 09 May 2011 09:52:38 -0800</pubDate>
	<category>access</category>
	<category>database</category>
	<category>microsoft</category>
	<category>programming</category>
	<category>vba</category>
	<dc:creator>jsturgill</dc:creator>
	</item>
	<item>
	<title>VBAin&apos;t working</title>
	<link>http://ask.metafilter.com/173820/VBAint%2Dworking</link>	
	<description>VBA for Word help. A lot of help. I&apos;m trying to find a string, then search and replace a space within that string. I can do parts of this, but not the whole thing and not for the whole document at once. So I&apos;m lazy. I like to automate certain Word tasks. I&apos;ve been doing this with a few wildcard searches in Word, but wouldn&apos;t it be nice for me to have a script rather than having to type the search each time? It would!&lt;br&gt;
&lt;br&gt;
Here&apos;s an example. I want to replace all instances of &quot;X. Y.&quot; with &quot;X.Y.&quot; (closed up space), for example. Manually, I can search for all instances of &quot;X. Y.&quot; in the main document with Find &amp;gt; with wildcards &amp;gt; [A-Z]\. [A-Z]\.&quot;. Then I do a search and replace for &quot; &quot; (a space) with &quot;&quot; (nothing) within that selection.&lt;br&gt;
&lt;br&gt;
I can&apos;t figure out enough VBA for Word to get this done automatically. I had it apparently working for a single instance, but I had to run the macro over and over again rather than it looping through the document.&lt;br&gt;
&lt;br&gt;
Sub ScratchMacro()&lt;br&gt;
&lt;br&gt;
With Selection.Find&lt;br&gt;
    .ClearFormatting&lt;br&gt;
    .Text = &quot;[A-Z]\. [A-Z]\.&quot;&lt;br&gt;
    .MatchWildcards = True&lt;br&gt;
    .Wrap = wdFindStop&lt;br&gt;
    .Execute&lt;br&gt;
    &lt;br&gt;
 Do While .Found = True&lt;br&gt;
&lt;br&gt;
    With Selection.Find&lt;br&gt;
        .ClearFormatting&lt;br&gt;
        .MatchWildcards = False&lt;br&gt;
        .Text = &quot; &quot;&lt;br&gt;
        .Replacement.Text = &quot;&quot;&lt;br&gt;
        .Execute Replace:=wdReplaceAll&lt;br&gt;
    End With&lt;br&gt;
&lt;br&gt;
Loop&lt;br&gt;
&lt;br&gt;
End With&lt;br&gt;
End Sub&lt;br&gt;
&lt;br&gt;
(And once that worked and then it seemed to not work.) I don&apos;t know what Word&apos;s problem is, but I just can&apos;t find the right VBA code for this one thing I want to do. If I get this working, I can modify it for other searches. Asking too much? Doomed to search manually forever? I&apos;m in over my head, obviously.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2010:site.173820</guid>
	<pubDate>Tue, 21 Dec 2010 20:16:46 -0800</pubDate>
	<category>findandreplace</category>
	<category>searchandreplace</category>
	<category>vba</category>
	<category>word</category>
	<dc:creator>theredpen</dc:creator>
	</item>
	<item>
	<title>Programs to learn on?</title>
	<link>http://ask.metafilter.com/162967/Programs%2Dto%2Dlearn%2Don</link>	
	<description>I&apos;d like some program ideas to implement. I&apos;d like useful programming project ideas (Windows and web) that one person could feasibly implement and that actually solve problems or meet some need.&lt;br&gt;
&lt;br&gt;
Currently I&apos;m working on a library app for my personal use that will store cover images, a rating, reviews, etc.  I&apos;d like more ideas like that.&lt;br&gt;
&lt;br&gt;
The goal is to have a useful and reachable objective so I can stretch my programming knowledge and learn stuff.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2010:site.162967</guid>
	<pubDate>Sun, 22 Aug 2010 15:36:12 -0800</pubDate>
	<category>applications</category>
	<category>apps</category>
	<category>c</category>
	<category>php</category>
	<category>programming</category>
	<category>programs</category>
	<category>resolved</category>
	<category>vba</category>
	<category>vbnet</category>
	<category>webprogramming</category>
	<category>windows</category>
	<category>windowsapplications</category>
	<category>windowsprogramming</category>
	<dc:creator>jsturgill</dc:creator>
	</item>
	<item>
	<title>Who can help me with this?</title>
	<link>http://ask.metafilter.com/154499/Who%2Dcan%2Dhelp%2Dme%2Dwith%2Dthis</link>	
	<description>Where is the best place to look for help with Access? I like and trust the answers I get on AskMetafilter but they are expensive (1 per week etc.) I have a programming question that I need help thinking through. Here is my issue:&lt;br&gt;
I have a custom function that hinges on grabbing data out of a specific query. It opens Outlook, creates a new email and populates the fields with specific addresses and data taken from the query (&quot;AppsEmail&quot;). &lt;br&gt;
Now I want to make a different query (&quot;RequestEmail&quot;) and have it populate the email with &lt;em&gt;that &lt;/em&gt;data. So all I have to do is change this line:&lt;br&gt;
Set MailList = db.OpenRecordset(&quot;AppsEmail&quot;)&lt;br&gt;
&lt;br&gt;
and that&apos;s where I get stumped.&lt;br&gt;
&lt;br&gt;
So I guess this a multi-part question:&lt;br&gt;
1. Where is the best place to go for help thinking through things like this? What I would really love is a &quot;mentor&quot; kind of person that I could just hit up on IM, but that seems like too much to ask. Instead I would settle for a good responsive forum. &lt;br&gt;
2. Does anyone have any guidance on my specific problem?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2010:site.154499</guid>
	<pubDate>Fri, 21 May 2010 10:25:55 -0800</pubDate>
	<category>access2007</category>
	<category>forums</category>
	<category>resolved</category>
	<category>vba</category>
	<dc:creator>amethysts</dc:creator>
	</item>
	<item>
	<title>Trying to find Excel VBA code for &quot;round dot&quot; gridline.</title>
	<link>http://ask.metafilter.com/151540/Trying%2Dto%2Dfind%2DExcel%2DVBA%2Dcode%2Dfor%2Dround%2Ddot%2Dgridline</link>	
	<description>Excel VBA question: help me insert a &quot;round dot&quot; gridline in my chart. The following line of code inserts a dotted gridline in my chart:&lt;br&gt;
&lt;br&gt;
ActiveChart.Axes(xlValue).MajorGridlines.Border.LineStyle = xlDot&lt;br&gt;
&lt;br&gt;
But if you change the gridline manually, you have two dotted line options: a faint &quot;round dot&quot; line and a more prominent &quot;square dot&quot; line. The &quot;xlDot&quot; choice in the code above returns the &quot;square dot&quot; style. I want the round dot, but none of the &lt;a href=&quot;http://msdn.microsoft.com/en-us/library/bb241348.aspx&quot;&gt;xlLineStyle options&lt;/a&gt; correspond with the round dot style. How do I get that line style?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2010:site.151540</guid>
	<pubDate>Sun, 18 Apr 2010 18:14:17 -0800</pubDate>
	<category>excel</category>
	<category>macros</category>
	<category>vba</category>
	<dc:creator>mullacc</dc:creator>
	</item>
	<item>
	<title>Using Excel to create the body of an Outlook e-mail</title>
	<link>http://ask.metafilter.com/146893/Using%2DExcel%2Dto%2Dcreate%2Dthe%2Dbody%2Dof%2Dan%2DOutlook%2Demail</link>	
	<description>Complex Excel question - need to select a range of cells, based on the selection of a separate cell. But wait, it&apos;s more complicated than that! I&apos;m creating a workbook with a feature that copies a range of cells into the body of an Outlook e-mail message. &lt;br&gt;
&lt;br&gt;
I have the VBA to generate an Outlook e-mail from Excel, and I have the VBA to run a macro based on simply selecting a cell in a certain column - all of this falls in line with what I need.&lt;br&gt;
&lt;br&gt;
What I don&apos;t have is the VBA to, based on the selection a cell, copy a range of cells.&lt;br&gt;
&lt;br&gt;
For instance: I select cell &quot;J8&quot;, and cells &quot;A8:H12&quot; are copied. Or if I select cell &quot;J20&quot;, cells &quot;A20:H24&quot; are copied. &lt;br&gt;
&lt;br&gt;
Preference is for this to be accomplished via VBA.&lt;br&gt;
&lt;br&gt;
Any help?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2010:site.146893</guid>
	<pubDate>Wed, 24 Feb 2010 21:24:43 -0800</pubDate>
	<category>excel</category>
	<category>outlook</category>
	<category>vba</category>
	<dc:creator>doh ray mii</dc:creator>
	</item>
	<item>
	<title>VBA Moron Wants Magic Bullet</title>
	<link>http://ask.metafilter.com/146477/VBA%2DMoron%2DWants%2DMagic%2DBullet</link>	
	<description>Access 2007:  Need code to grab the value _displayed_ in a combo box (as opposed to its actual value).  Big, detailed explanation inside. I have a form which involves a couple of combo boxes, and I would like to base some conditional coding based on the displayed contents of the combo boxes.  However, the bound field of the combo box is not the control source of the combo box.  How do I get my VBA code to recognize the displayed text, rather than going to the underlying number?&lt;br&gt;
&lt;br&gt;
Specifics, if needed:&lt;br&gt;
The table this form feeds back to has the following fields:&lt;br&gt;
&lt;br&gt;
LMAutoID        AutoNumber field&lt;br&gt;
LMDate           Date field&lt;br&gt;
LMEmployee   Number field (lookup box feeding from an employee table.) &lt;br&gt;
LMLocation     Number field (lookup box feeding from a cost allocation table)&lt;br&gt;
LMEmergency Yes/No field&lt;br&gt;
LMCount         Number field&lt;br&gt;
&lt;br&gt;
Basically, the LMEmployee has to submit daily LMCounts for any of 4 possible locations, and subdivide them out by whether it was (1) an emergency and (2) a water or a sewer call.  The water/sewer differentiation has not been given a field because the cost allocation table lists water/sewer for each location option, making the distinction implicit in the LMLocation selection.  Note that both lookup fields are rooted in their respective table&apos;s autoID field, for all they display a text value.&lt;br&gt;
&lt;br&gt;
Because of the nature of the data collected (up to 16 LMCount entries for each date), the typing on trial was extremely repetitive.  So far I&apos;ve dealt with that by &lt;br&gt;
&lt;br&gt;
(1) embedding the LM form in an employee form, so that the employee can pull up their own name and have that value forward to the LM form, so they don&apos;t have to type their own name for every entry of every day of the month.  &lt;br&gt;
&lt;br&gt;
(2) adding an unbound field at the end of the form with an &quot;on exit&quot; event procedure.  Depending on whether the unbound field has been changed, the default value for the date field will either be the same date as the record just finished, or will advance by one day.&lt;br&gt;
&lt;br&gt;
(3) setting the default value of LMEmergency to &quot;no,&quot; since about 80% of the time, entries will be non-emergency only.&lt;br&gt;
&lt;br&gt;
The final cheat that would make this data entry relatively painless would be an evaluation based on whether the entry was &quot;Water&quot; or &quot;Sewer.&quot;  Basically, the things almost always come in pairs.  (...almost...)  So if you did 5 line marking tickets for water at a location on December 7, you&apos;d &lt;em&gt;almost&lt;/em&gt; certainly be doing 5 sewer markings at that location on December 7.  What I&apos;d like to do is to set up something where every time a water record was created, the new record would basically default-in all the values from the exiting record, except for the MLLocation specification.  The user could then specify the location (and again, the water-sewer distinction is implicit in the location selection), press [tab], and the entry, voila, would be done.  Or [Esc] if there were no corresponding Sewer markings.&lt;br&gt;
&lt;br&gt;
I&apos;m not good at VBA.  I only venture there when I&apos;ve run out of SQL ideas.  I tried making a (non-visible) combo-box which was sourced on MLLocation but displayed the cost allocation&apos;s water-sewer designation, but the problem is still the same:  &lt;br&gt;
&lt;br&gt;
     me.MLLocation.value = &lt;strong&gt;&lt;em&gt;the wrong field&lt;/em&gt;&lt;/strong&gt;  &lt;br&gt;
&lt;br&gt;
The number that statement collects is the bound column&apos;s value, which happens to be the cost allocation&apos;s autoID number.  This cannot (in my opinion --which may be uninformed) be meaningfully translated into the value I need, which is &quot;Water&quot; or &quot;Sewer&quot;.  Is there a way to simply copy the displayed string from the combo box and use that value as the basis for my if/then statement?&lt;br&gt;
&lt;br&gt;
There is a whispering voice at the back of my brain that says, &quot;rethink the tables, man!&quot;  But I don&apos;t think that parsing this table into multiple interdependent tables will result in easier data entry.  I&apos;m really hoping for a code fix, since there&apos;s so much cool stuff that can be accomplished that way, if you just know what to say!  &lt;br&gt;
&lt;br&gt;
Bonus points if you can figure a way to get the MLLocation field to fill in itself:  The location names used in the LM table always start with &quot;w&quot; if it&apos;s water, and &quot;s&quot; if it&apos;s sewer.  So a typical allocation record would be:&lt;br&gt;
&lt;br&gt;
AutoID	LocationName	System	LocationLookupName&lt;br&gt;
1	Mercer Island            Water	wMI&lt;br&gt;
3	Hells Gate	                Sewer	sHG&lt;br&gt;
5	Mercer Island	Sewer	sMI&lt;br&gt;
6	Hells Gate	Water	wHG&lt;br&gt;
&lt;br&gt;
This transfers to the LM table as:&lt;br&gt;
&lt;br&gt;
Date	Employee	                Location     Emerg?	            Count&lt;br&gt;
12/5/09	Dan The Man	wMI	  No		4&lt;br&gt;
12/5/09	Dan The Man	sMI	  No		4&lt;br&gt;
&lt;br&gt;
Thanks all!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2010:site.146477</guid>
	<pubDate>Sat, 20 Feb 2010 18:22:51 -0800</pubDate>
	<category>Access</category>
	<category>Code</category>
	<category>ComboBox</category>
	<category>CopyValue</category>
	<category>resolved</category>
	<category>SetValue</category>
	<category>VBA</category>
	<dc:creator>Ys</dc:creator>
	</item>
	<item>
	<title>Need help developing a Excel VBA Macro to Vaildate data entered into a textbox </title>
	<link>http://ask.metafilter.com/139064/Need%2Dhelp%2Ddeveloping%2Da%2DExcel%2DVBA%2DMacro%2Dto%2DVaildate%2Ddata%2Dentered%2Dinto%2Da%2Dtextbox</link>	
	<description>Need help developing a Excel VBA Macro to Vaildate data entered into a textbox I am collecting data from users in a Excel spreadsheet. To ensure all the required fields are filled out, I have created a userform that loads on opening of the spread sheet. &lt;br&gt;
&lt;br&gt;
Currently there are three Textboxes a command button writes the data to the sheet and highlights in pink any not filledout. &lt;br&gt;
&lt;br&gt;
I need it to only write to the sheet ONLY when all the textboxes are filled out after being called by a cmd button - If it not satisifed the blank fields are highlighted in pink.  &lt;br&gt;
&lt;br&gt;
I also  need a higher level of data vaildation on the two other text boxes. &lt;br&gt;
&lt;br&gt;
Textbox2 must contain an email address (checking for hyperlinked content is probably the easiest way to vaildate for this)&lt;br&gt;
&lt;br&gt;
Textbox3 must contain only a 9 digit numerical number&lt;br&gt;
&lt;br&gt;
Any VBA gurus - please help&lt;br&gt;
&lt;br&gt;
Option Explicit&lt;br&gt;
Dim y As Long&lt;br&gt;
Const pink = 16761855 &lt;br&gt;
Private Sub CommandButton1_Click()&lt;br&gt;
Dim EmptyBoxes As Integer&lt;br&gt;
    EmptyBoxes = EmptyBoxes + check(TextBox1)&lt;br&gt;
    EmptyBoxes = EmptyBoxes + check(TextBox2)&lt;br&gt;
    EmptyBoxes = EmptyBoxes + check(TextBox3)&lt;br&gt;
    If EmptyBoxes = 0 Then&lt;br&gt;
        ActiveWorkbook.Save&lt;br&gt;
        Unload Me&lt;br&gt;
    End If&lt;br&gt;
End Sub &lt;br&gt;
Function check(tb As Control)&lt;br&gt;
Dim res As Integer&lt;br&gt;
    res = 0&lt;br&gt;
    If tb.Text = vbNullString Then&lt;br&gt;
      res = 1&lt;br&gt;
        tb.BackColor = pink&lt;br&gt;
    Else&lt;br&gt;
        Cells(y, CLng(Right(tb.Name, 1))) = tb&lt;br&gt;
    End If&lt;br&gt;
     check = res&lt;br&gt;
End Function &lt;br&gt;
Private Sub UserForm_Activate()&lt;br&gt;
    y = [A1].End(xlDown).Row + 1&lt;br&gt;
End Sub</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.139064</guid>
	<pubDate>Wed, 25 Nov 2009 10:03:11 -0800</pubDate>
	<category>datavaildation</category>
	<category>dv</category>
	<category>excel</category>
	<category>macro</category>
	<category>vba</category>
	<dc:creator>complience</dc:creator>
	</item>
	<item>
	<title>MacgyverFilter: link sharing using MS Office</title>
	<link>http://ask.metafilter.com/138600/MacgyverFilter%2Dlink%2Dsharing%2Dusing%2DMS%2DOffice</link>	
	<description>Macgyver IT: I want my team to use something like del.icio.us to share links. But since this is ask.metafilter, I can&apos;t use the obvious right answer. I need to make something like it myself, using &lt;strike&gt;bubblegum and string&lt;/strike&gt; the MS Office 2000 suite and my knowledge of VB. What would be my best approach? This is clearly insane, but I want to try &lt;small&gt;(please don&apos;t ask why I can&apos;t use something reasonable -- I just can&apos;t)&lt;/small&gt;. I don&apos;t need the full del.icio.us, just links and tags. I&apos;m also okay with having only one person at a time able to add a link to the dB, and everyone sharing a big ball of links.&lt;br&gt;
&lt;br&gt;
I&apos;ve thought about using an Excel file, but I don&apos;t know if there&apos;s a reasonable way to do that, or what that way would be. Could that work, or should I bite the bullet and go for Access? Is there a feature hidden somewhere (in Outlook?) that I&apos;m overlooking?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.138600</guid>
	<pubDate>Thu, 19 Nov 2009 19:23:17 -0800</pubDate>
	<category>access</category>
	<category>delicious</category>
	<category>excel</category>
	<category>link</category>
	<category>msoffice</category>
	<category>office</category>
	<category>office2000</category>
	<category>programming</category>
	<category>sharing</category>
	<category>vb</category>
	<category>vba</category>
	<category>visualbasic</category>
	<dc:creator>Monday, stony Monday</dc:creator>
	</item>
	<item>
	<title>MS Outlook: scheduling VBA scripts?</title>
	<link>http://ask.metafilter.com/137776/MS%2DOutlook%2Dscheduling%2DVBA%2Dscripts</link>	
	<description>Using Outlook 2007 on windows XP, how do I run a (VBA) script either daily, or on opening the application? In excel, I&apos;d use something like an Auto_Open() sub, but I can&apos;t seem to find an analog for Outlook. Can I just refer to the script to a recurring appointment somehow?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.137776</guid>
	<pubDate>Tue, 10 Nov 2009 15:45:38 -0800</pubDate>
	<category>outlook</category>
	<category>resolved</category>
	<category>schedule</category>
	<category>scripting</category>
	<category>VBA</category>
	<dc:creator>pompomtom</dc:creator>
	</item>
	<item>
	<title>Excel solver macro help. </title>
	<link>http://ask.metafilter.com/136977/Excel%2Dsolver%2Dmacro%2Dhelp</link>	
	<description>I have a column of around 100 equations that can only be solved with solver in Excel. 
Is there any way to create a macro for this purpose. The layout of the spreadsheet given below. ........................   |W1|W2|W3| SD&lt;br&gt;
E(Rp1) &quot;|............|   0  | 0 _ |_1|_0&lt;br&gt;
&lt;br&gt;
We are seeking to minimize SD by changing W1, W2 and W3, under the constraint E(Rp1)= a certain number: which starts at say 2 and increases by .1 till 20. The question is whether macros can be written for add-ins?&lt;br&gt;
&lt;br&gt;
All that weird formatting was to make sure the cells would line up.</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.136977</guid>
	<pubDate>Sun, 01 Nov 2009 11:24:56 -0800</pubDate>
	<category>Macro</category>
	<category>MSExcel</category>
	<category>resolved</category>
	<category>Solver</category>
	<category>VBA</category>
	<dc:creator>Lucubrator</dc:creator>
	</item>
	<item>
	<title>Know any good VBA tutorials?</title>
	<link>http://ask.metafilter.com/135843/Know%2Dany%2Dgood%2DVBA%2Dtutorials</link>	
	<description>Can you reccommend VBA tutorials, particularly for MS Excel 2007? I used to know a tad of VBA that I used in the context of Access databases. However, I need to program some macros to help analyze our search analytics reports. I am floundering a bit -- so I&apos;ve decided I need to go back to basics and more throroughly learn VBA. I checked previous questions and either they addressed a specific issue or the links provided in the answers are now dead :( I did look at the granddaddy of Excel discussions on the Blue. From there I checked out the Excel Nexus and VB Users pages. Those will be great when I&apos;m beyond the basics, but they not at a tutorial level. I&apos;ve consulted Google but there are tons of returns and I&apos;m not sure how to tell which are any good.&lt;br&gt;
Thanks for any leads!</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.135843</guid>
	<pubDate>Mon, 19 Oct 2009 08:11:55 -0800</pubDate>
	<category>excel</category>
	<category>tutorials</category>
	<category>VBA</category>
	<dc:creator>Librarygeek</dc:creator>
	</item>
	<item>
	<title>Excel Programming Book</title>
	<link>http://ask.metafilter.com/129295/Excel%2DProgramming%2DBook</link>	
	<description>Can anyone recommend a good book for medium-advanced level vba programming for Excel?</description>
	<guid isPermaLink="false">tag:ask.metafilter.com,2009:site.129295</guid>
	<pubDate>Tue, 04 Aug 2009 20:33:28 -0800</pubDate>
	<category>book</category>
	<category>Excel</category>
	<category>recommendation</category>
	<category>vba</category>
	<dc:creator>Miss Otis&apos; Egrets</dc:creator>
	</item>
	
	</channel>
</rss>

