Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default activating a workbook

it seemed like it should be asy.
here is what i did:

CrntCompfile = ActiveWorkbook.FullName
Workbooks("CrntCompFile").Activate

With or without the quotations, I get a "...subscript out of range..."
message.

I do not want to use a 'WindowNext.Activate' because the user may have other
stuff open.

Thansk for any suggestions

--
Message posted via http://www.officekb.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default activating a workbook

Hi Almagg,

Try removing the quotes from the variable CrntCompFile.


However, why would you seek to activate the active
workbook?


---
Regards,
Norman



"Almagg via OfficeKB.com" <u33343@uwe wrote in message
news:70cd34632d4c6@uwe...
it seemed like it should be asy.
here is what i did:

CrntCompfile = ActiveWorkbook.FullName
Workbooks("CrntCompFile").Activate

With or without the quotations, I get a "...subscript out of range..."
message.

I do not want to use a 'WindowNext.Activate' because the user may have
other
stuff open.

Thansk for any suggestions

--
Message posted via http://www.officekb.com



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 5,302
Default activating a workbook

Hi Almagg,

I intended to add that you should replace the Workbook's
FullName property with its Name property:



---
Regards,
Norman


  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default activating a workbook

norman

that did it. i thought i had done both, but apparently not.

well the user may have excel files open and my code goes thru three workbooks.

so i did not want to keep track using 'WindowNext.Activate'.

better i just refer to them by name.

thanks

al

--
Message posted via OfficeKB.com
http://www.officekb.com/Uwe/Forums.a...mming/200704/1

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
Activating Workbook Chip Pearson Excel Programming 3 December 30th 06 01:53 AM
Activating Workbook Rod Gill Excel Programming 1 December 29th 06 10:09 PM
Activating a workbook Boldie Excel Programming 5 July 19th 06 03:15 AM
activating a workbook VB Script for Excel Excel Programming 12 March 22nd 06 07:55 AM
Activating a workbook help bmwmcrider Excel Programming 1 October 21st 03 01:48 PM


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