Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Application.inputbox for another workbook

Hi

I need to select two ranges. One range comes from the current workbook.
Another from a separate workbook. The following code helps me select
ranges from different worksheets within the same workbook but I cannot
seem to move to another workbook.

What could be going wrong?

Please help!

Thanks
Utkarsh
*****************
Sub comp1()


Dim FirstRange As Range
Dim SecondRange As Range

'snip snip

Set FirstRange = Application.InputBox("Set first series: ", Type:=8)
Set SecondRange = Application.InputBox("Set Second series: ",
Type:=8)

'snip snip

end sub

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 644
Default Application.inputbox for another workbook

Add this:
Workbooks("Yourbook2.xls").Activate
Between the to input box statements.
and this after the second inputbox statement:
Thisworkbook.Activate

Charles Chickering

Utkarsh wrote:
Hi

I need to select two ranges. One range comes from the current workbook.
Another from a separate workbook. The following code helps me select
ranges from different worksheets within the same workbook but I cannot
seem to move to another workbook.

What could be going wrong?

Please help!

Thanks
Utkarsh
*****************
Sub comp1()


Dim FirstRange As Range
Dim SecondRange As Range

'snip snip

Set FirstRange = Application.InputBox("Set first series: ", Type:=8)
Set SecondRange = Application.InputBox("Set Second series: ",
Type:=8)

'snip snip

end sub


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 18
Default Application.inputbox for another workbook

Thanks Die_Another_Day

In my case the file name and location keeps changes. Would appreciate a
more general solution.

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
Inputbox and Application.InputBox Maria[_7_] Excel Programming 1 September 20th 04 11:36 AM
inputbox and application.run macro1 Michael Joe Excel Programming 3 August 13th 04 09:34 PM
application.inputbox Murat Excel Programming 4 February 24th 04 11:38 AM
Application.Inputbox Question ndp Excel Programming 3 December 8th 03 06:12 PM


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