View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] fred.sheriff@gmail.com is offline
external usenet poster
 
Posts: 5
Default Macro that will insert a simple text string in top cell of text file

I am building a macro in Access but i have hit a snag since fields cannot be titled more than 64 characters. So now I need to come up with some VBA that will simply insert text into cell A1 of a closed file.

I need for the top right cell (i.e., Cell A1) to read:

"Action (SiteID=US|Country=US|Currency=USD|ListingType=Hal f|Location=US|ListingDuration=GTC)"

I am hoping to build a separate macro that will insert the below text in cell A1 of this file. The file it titled: 007_HalfFileAV2.txt. I can either delete and paste over the existing text in cell A1 (which shows the truncated first 64 characters, i.e., "Action (SiteID=US|Country=US|Currency=USD|ListingType=Hal f|Locat", or I can add the missing "ion=US|ListingDuration=GTC)" to the end of the truncated text.....whichever is easier.

Is there some straightforward VBA code that I can add to an excel workbook that will accomplish this? I don't have VBA experience with Access but that would be another option. Thanks for any direction, code, etc that you can provide.