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


YYY = activeworkbookname

I then open a workbook with

FileToOpen = Application.GetOpenFilename("Excel File (*.xls), *.xls",
"Select Your File", , False)

copy a range in the newly open book

activate the workbook called YYY (activeworkbookname)

and paste

I now need to reopen the "FileToOpen" book. The windows.activatenex
does not work for me as the user may have other workbooks open and V
MAY activate the wrong book

Any tricks will be appreciate

--
Bonzo12
-----------------------------------------------------------------------
Bonzo123's Profile: http://www.excelforum.com/member.php...fo&userid=2418
View this thread: http://www.excelforum.com/showthread.php?threadid=39814

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 27,285
Default windows.activatenext

Dim bk as Workbook
FileToOpen = Application.GetOpenFilename("Excel File (*.xls), *.xls", ,
"Select Your File", , False)

workbooks.Open FileToOpen

set bk = ActiveWorkbook
copy a range in the newly open book

bk.Activate

--
Regards,
Tom Ogilvy

"Bonzo123" wrote in
message ...

YYY = activeworkbookname

I then open a workbook with

FileToOpen = Application.GetOpenFilename("Excel File (*.xls), *.xls", ,
"Select Your File", , False)

copy a range in the newly open book

activate the workbook called YYY (activeworkbookname)

and paste

I now need to reopen the "FileToOpen" book. The windows.activatenext
does not work for me as the user may have other workbooks open and VB
MAY activate the wrong book

Any tricks will be appreciated


--
Bonzo123
------------------------------------------------------------------------
Bonzo123's Profile:

http://www.excelforum.com/member.php...o&userid=24182
View this thread: http://www.excelforum.com/showthread...hreadid=398142



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default windows.activatenext


Thanks Tom.

Regards

Brian


--
Bonzo123
------------------------------------------------------------------------
Bonzo123's Profile: http://www.excelforum.com/member.php...o&userid=24182
View this thread: http://www.excelforum.com/showthread...hreadid=398142

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
i want all windows in one excel frame (windows in taskbar) Subramanya Excel Discussion (Misc queries) 1 December 18th 09 03:14 PM
cannot open exel from windows xp in windows vista and visa versa lildiana New Users to Excel 4 February 25th 09 07:26 PM
can windows vista edit shared document from windows xp sasa Excel Worksheet Functions 1 January 9th 08 06:44 PM
Page breaks are different in Windows 2000 and Windows XP Bill Allen Excel Discussion (Misc queries) 1 November 23rd 05 04:42 PM
Use Windows Script to run Windows Explorer Search? Ian Elliott[_3_] Excel Programming 0 January 12th 04 05:03 PM


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