#1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default error 400

I open a workbook with vba, I then wish to copy data from the sheet to the
host workbook. This works fine until I attempt to select a range in the
opened sheet:

Workbooks.Open FileName:=FileName


Windows(FileName).Activate
Range("B7:E18").Select

The range select causes an error 400. Is this because the I am not opening
the file with read write permissions?
Anyone help with this.
Thanks
--
JoeBo
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2
Default error 400

Found the answer.
I was not specifying the sheet. instead of

Range("B7:E18").Select
I should have put:

ActiveSheet.Range("B7:E18").Select


"JoeBo" wrote:

I open a workbook with vba, I then wish to copy data from the sheet to the
host workbook. This works fine until I attempt to select a range in the
opened sheet:

Workbooks.Open FileName:=FileName


Windows(FileName).Activate
Range("B7:E18").Select

The range select causes an error 400. Is this because the I am not opening
the file with read write permissions?
Anyone help with this.
Thanks
--
JoeBo

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
Error: "Excel encountered an error and had to remove some formatti Carl Excel Discussion (Misc queries) 0 September 18th 06 06:39 PM
Counting instances of found text (Excel error? Or user error?) S Davis Excel Worksheet Functions 5 September 12th 06 04:52 PM
Befuddled with For Next Loop ------ Run - Time Error '13' Type Mismatch Error rdavis7408 Excel Programming 1 August 25th 04 03:54 AM
Automation Error, Unknown Error. Error value - 440 Neo[_2_] Excel Programming 0 May 29th 04 05:26 AM


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