Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3,290
Default VBA problem after Excel update?


Sören,
Take a look at this post...
http://tinyurl.com/37dvav
--
Jim Cone
San Francisco, USA
http://www.realezsites.com/bus/primitivesoftware
(Excel Add-ins / Excel Programming)




"Sören_Marodören"
wrote in message
Hi,
I have a VBA script that I use to convert CSV-files from a TDS1014
oscilloscope.
With this script I can open a CSV-file, convert it with the macro, and then
open
another CSV-file to convert, and so on.

But since two weeks this does not work.
If I open a CSV-file, run the script and then open another file, the
information is automatically sorted into different columns. But not in the
way that I want.
So now I have to fist open all files that I want to convert, then run the
script,
file by file.
If I then want to convert another file, I have to close down Excel completely
and start it up from scratch.

I have not changed the script sins October 2007 and I have not done anything
in
the Excel setup. So it must have to do with some of the latest updates.

Has anyone else seen something like this?

Best regards,
/Sören


--- The script ---
Sub Read_Osc_data()
' Reformat column 1 to many columns
Columns("A:A").Select
Selection.TextToColumns Destination:=Range("A1"), DataType:=xlDelimited, _
TextQualifier:=xlDoubleQuote, ConsecutiveDelimiter:=False,
Tab:=True, _
Semicolon:=False, Comma:=True, Space:=False, Other:=False, FieldInfo _
:=Array(Array(1, 1), Array(2, 1), Array(3, 1), Array(4, 1), Array(5,
1), Array(6, 1)), _
DecimalSeparator:=".", TrailingMinusNumbers:=True

' Remove header information
Range("A1:B16").Select
Selection.ClearContents

' Copy data to column 1 and 2
Columns("D:E").Select
Selection.Copy
Columns("A:A").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone,
SkipBlanks _
:=False, Transpose:=False

' Format old header
Range("B1:B15").Select
Application.CutCopyMode = False
Selection.NumberFormat = "General"

' Remove old data
Columns("D:E").Select
Selection.ClearContents
End Sub

--- Example from a CSV-file ---
Record Length,1.024000e+03,, 0.00000, -7.74850,
Sample Interval,1.233033e+01,, 12.33033, -5.34850,
Trigger Point,0.000000000000e+00,, 24.66067, -12.14850,
,,, 36.99100, -18.94850,
,,, 49.32134, -18.14850,
,,, 61.65167, -18.54850,
Source,MATH,, 73.98201, -24.54850,
Vertical Units,dB,, 86.31234, -57.34850,
Vertical Scale,1.000000e+01,, 98.64268, -72.54850,
Vertical Offset,0.000000e+00,, 110.97301, -61.34850,
Horizontal Units,Hz,, 123.30335, -56.94850,
Horizontal Scale,1.262626e+03,, 135.63368, -46.94850,
Pt Fmt,Y,, 147.96402, -45.74850,
Yzero,-3.494850e+01,, 160.29435, -45.34850,
Probe Atten,1.000000e+00,, 172.62468, -49.74850,
Firmware Version,FV:v6.08,, 184.95502, -74.94850,
,,,197.28535, -69.34850,
,,,209.61568, -65.34850,
,,,221.94601, -57.34850,
,,,234.27634, -46.94850,
,,,246.60667, -45.74850,
,,,258.93700, -46.14850,
,,,271.26733, -46.14850,
,,,283.59766, -42.94850,
,,,295.92799, -41.74850,
,,,308.25832, -41.34850,
,,,320.58865, -48.54850,
,,,332.91898, -41.74850,
,,,345.24931, -38.94850,
........

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
Shared Excel Update Problem Johnson Excel Discussion (Misc queries) 0 November 9th 09 10:57 PM
Excel Template problem - update existing record [email protected] Excel Discussion (Misc queries) 0 January 26th 07 11:34 AM
vba excel update to a database problem John Chan Excel Programming 0 November 23rd 06 07:43 AM
Security update KB905756 problem with Excel 2003 Peter20006 Excel Discussion (Misc queries) 0 March 23rd 06 09:19 PM
Excel 2003 - Update or Don't Update Links Problem Jamie Excel Programming 4 July 7th 05 02:08 PM


All times are GMT +1. The time now is 11:24 AM.

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

About Us

"It's about Microsoft Excel"