Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
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.
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,514
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.


Why not simply open the file in Excel?

Otherwise...
What is your task using Access, and why are you using Excel?
Why does your data structure violate database rules?

--
Garry

Free usenet access at http://www.eternal-september.org
Classic VB Users Regroup!
comp.lang.basic.visual.misc
microsoft.public.vb.general.discussion


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Get cell string to text file jason Excel Programming 0 November 30th 05 05:46 PM
Need a macro to insert text in a cell that already has text.Excel go1angel Excel Discussion (Misc queries) 2 October 5th 05 10:32 PM
Need a macro to insert text in a cell that already has text.Excel go1angel Excel Programming 1 October 4th 05 06:54 PM
Need help with insert text file Macro Ben79 Excel Programming 0 July 21st 05 11:37 AM
Need macro to insert text string while inside cell (formula) BrianB Excel Discussion (Misc queries) 0 May 31st 05 03:18 PM


All times are GMT +1. The time now is 09:53 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"