Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Excel 2007 vba question


L.S.

The code:

vFileName = Application.GetOpenFilename("CSV Files (*.csv), *.csv", 1,
"Select csv file.")
Sheets.Add Type:=vFileName

worked fine in excel 2003 vba but in excel 2007 vba it gives the
error:

Run-time error '1004':
Method 'Add' of object 'Sheets' failed

The code line :

Sheets.Add Type:="D:\overview.csv"

worksfine in both versions.

Can someone help me with this....?

kaak


--
Kaak
------------------------------------------------------------------------
Kaak's Profile: http://www.excelforum.com/member.php...fo&userid=7513
View this thread: http://www.excelforum.com/showthread...hreadid=556333

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
Excel 2007 Macro/VB Question DDE Question MadDog22 Excel Worksheet Functions 1 March 10th 10 01:47 AM
2007 Excel Tab Question WSR Excel Discussion (Misc queries) 0 August 12th 08 01:22 PM
Two question about Excel 2007 MZ Excel Worksheet Functions 4 February 28th 08 12:01 AM
Excel 2007 Question Complibr Excel Discussion (Misc queries) 1 December 7th 07 12:12 AM
Excel 2007 question? Dan the Man[_2_] Excel Worksheet Functions 4 July 8th 07 11:28 PM


All times are GMT +1. The time now is 04:48 AM.

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"