Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Help w/ Left, Right, Mid String

Hi all,
I have a vb script that reads a file and dumps the file
name and totals into a spreadsheet - that part works! I
need to parse the filename and also only read the last
three numerics from the totals(strline) - instead
of "Total # 45".

<code snip

objExcel.Activeworkbook.worksheets(1) _
.cells(rw,1).Resize(1,2).Value = Array(file.Name,
strLine)

objExcel.Activeworkbook.Worksheets(1).Columns(1).R esize
(,2).Autofit

ActiveCell.EntireRow.Cells(1, "C").Value = Left
(file.name,3)

ActiveCell.EntireRow.Cells(1, "D").Value = Mid(file.name,
5,6)

ActiveCell.EntireRow.Cells(1,"E").value = Right
(strLine,4)


**************
I get an invalid procedure call "left" when running this
code.

File Name example -- ABC-091004.txt
StrLine Example -- Total# 45 ( may have 4 numerics)

The complete file name goes into A2, and the complete
strLine goes into B2 and I would like the script to
automatically parse the string and put "ABC" into
C2, "091004" into D2, and " 45" into E2.

Thanks in advance for your time and effort ;)
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
when inserting new worksheets they read right to left not left to. Andy Setting up and Configuration of Excel 2 December 3rd 08 09:51 PM
How to extract left-most number from a string Jason[_11_] Excel Worksheet Functions 16 October 9th 08 11:10 PM
My Excel view is Right to Left instead of Left to Right !!! Akash Puri Excel Discussion (Misc queries) 2 May 5th 08 07:15 PM
Remove left text string Luc in Oxford Excel Discussion (Misc queries) 2 August 23rd 05 10:57 AM
How to change the right-to-left worksheet to left-to-right workshe RAMA Excel Discussion (Misc queries) 1 July 4th 05 01:57 PM


All times are GMT +1. The time now is 11:43 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"