Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default C++ Excel Automation

I need to reference a range of cells within Excel from an external
application. I need a simple string in the form Sheet!A4:B8 for example, but
I need this to be interactively selectable using Excel.

I have seen this done before in another application but I am not 100% sure
how. Ideally I would like a simple dialog with a line edit control for the
range and OK/Cancel buttons. This dialog would be shown along with Excel.
The user could then select a range within a worksheet and the result would be
displayed in the line edit control in the dialog. When the user is happy
they can click OK and the range would be available in the external
application. Ideally Excel would have very limited functionality to only
allow a range to be clicked and dragged.

I can run excel using automation in C++ and set a range etc but the problem
is getting notification back that a range has changed in Excel. Anyone got
any ideas?
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 772
Default C++ Excel Automation

It all depends how you open excel, full version, in a control etc. but you
can use a userform with a refedit control to let them select a range and
return the value as yo requested.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"PaulH" wrote:

I need to reference a range of cells within Excel from an external
application. I need a simple string in the form Sheet!A4:B8 for example, but
I need this to be interactively selectable using Excel.

I have seen this done before in another application but I am not 100% sure
how. Ideally I would like a simple dialog with a line edit control for the
range and OK/Cancel buttons. This dialog would be shown along with Excel.
The user could then select a range within a worksheet and the result would be
displayed in the line edit control in the dialog. When the user is happy
they can click OK and the range would be available in the external
application. Ideally Excel would have very limited functionality to only
allow a range to be clicked and dragged.

I can run excel using automation in C++ and set a range etc but the problem
is getting notification back that a range has changed in Excel. Anyone got
any ideas?

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 8
Default C++ Excel Automation

I have an Excel macro that displays a user form in the way I want but calling
it from an external application is proving problematic. I am not sure this
method will work with all versions of Excel and getting the selected range
back into the external application is proving problematic.

Any further help or ideas are appreciated.

Thanks

"John Bundy" wrote:

It all depends how you open excel, full version, in a control etc. but you
can use a userform with a refedit control to let them select a range and
return the value as yo requested.
--
-John
Please rate when your question is answered to help us and others know what
is helpful.


"PaulH" wrote:

I need to reference a range of cells within Excel from an external
application. I need a simple string in the form Sheet!A4:B8 for example, but
I need this to be interactively selectable using Excel.

I have seen this done before in another application but I am not 100% sure
how. Ideally I would like a simple dialog with a line edit control for the
range and OK/Cancel buttons. This dialog would be shown along with Excel.
The user could then select a range within a worksheet and the result would be
displayed in the line edit control in the dialog. When the user is happy
they can click OK and the range would be available in the external
application. Ideally Excel would have very limited functionality to only
allow a range to be clicked and dragged.

I can run excel using automation in C++ and set a range etc but the problem
is getting notification back that a range has changed in Excel. Anyone got
any ideas?

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
Supressing the ctrl-c and other keys during word automation in automation apondu Excel Programming 0 July 19th 07 10:10 PM
Excel Automation using .NET Suman Excel Programming 1 April 7th 05 12:49 PM
Automation : from Excel to VB ? PM Excel Programming 3 October 28th 04 09:19 PM
Excel automation in MFC charian Excel Programming 0 July 20th 04 03:45 AM
Excel Web Automation mccaka Excel Programming 1 October 9th 03 02:18 AM


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