Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Correct syntax for use Replace command via DDE?

Hi.
I am trying to run the Find/Replace command in Excel remotely via DDE.
What is the correct syntax for doing this?

I have tried this:

[Cells.Replace What:="@what", Replacement:="@with", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False]

but with no luck.
Is there a list of correct syntaxes for Excel VBA-commands run via DDE
anywhere? I have searched on the web without finding anything.

regards,
Bjørn Holm
Nordak as
Norway



  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default Correct syntax for use Replace command via DDE?

Hi,
I think you'll need to place Excel.Application.Workbook
("YourWork.xls").ActiveSheet.Cells.Replace (What:="@what",
Replacement:="@with", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False)

Hope this helps
regards
KM

PS I'm still looking for a proper solution but I think
that the the way you juat call Cells.Replace .... the
application does not know what to do to what sheet in what
workbook

-----Original Message-----
Hi.
I am trying to run the Find/Replace command in Excel

remotely via DDE.
What is the correct syntax for doing this?

I have tried this:

[Cells.Replace What:="@what", Replacement:="@with",

LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False]

but with no luck.
Is there a list of correct syntaxes for Excel VBA-

commands run via DDE
anywhere? I have searched on the web without finding

anything.

regards,
Bjørn Holm
Nordak as
Norway



.

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 32
Default Correct syntax for use Replace command via DDE?

Hi Bjørn

I've looked at the help in Excel and it indiactes that the
Replace is a worksheet function so I think you may have to
use Application.WorksheetFunction.Replace

I don't have an example because I've never needed to
Replace via DDE but I would expect the principle to be the
same.

Best of luck
KM
-----Original Message-----
Hi KM!
Still can't get it to work. I have also tried different

variations of your
example, but without luck.
Do you have an example that is confirmed to be working?

regards,
Bjørn Holm
Nordak as
Norway



skrev i melding
...
Hi,
I think you'll need to place Excel.Application.Workbook
("YourWork.xls").ActiveSheet.Cells.Replace (What:="@what",
Replacement:="@with", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False)

Hope this helps
regards
KM

PS I'm still looking for a proper solution but I think
that the the way you juat call Cells.Replace .... the
application does not know what to do to what sheet in what
workbook

-----Original Message-----
Hi.
I am trying to run the Find/Replace command in Excel

remotely via DDE.
What is the correct syntax for doing this?

I have tried this:

[Cells.Replace What:="@what", Replacement:="@with",

LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False]

but with no luck.
Is there a list of correct syntaxes for Excel VBA-

commands run via DDE
anywhere? I have searched on the web without finding

anything.

regards,
Bjørn Holm
Nordak as
Norway



.



.

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Correct syntax for use Replace command via DDE?

Here is the equivalent function in Word, that I have gotten working:
[EditReplace .Find="@what", .Replace="@with", .WholeWord=0, .MatchCase=0,
..Format=0, .ReplaceAll=1]

How to get this to work in Excel?

regards,
Bjørn Holm
Nordak as
Norway


"Kevin McCartney" skrev i melding
...
Hi Bjørn

I've looked at the help in Excel and it indiactes that the
Replace is a worksheet function so I think you may have to
use Application.WorksheetFunction.Replace

I don't have an example because I've never needed to
Replace via DDE but I would expect the principle to be the
same.

Best of luck
KM
-----Original Message-----
Hi KM!
Still can't get it to work. I have also tried different

variations of your
example, but without luck.
Do you have an example that is confirmed to be working?

regards,
Bjørn Holm
Nordak as
Norway



skrev i melding
...
Hi,
I think you'll need to place Excel.Application.Workbook
("YourWork.xls").ActiveSheet.Cells.Replace (What:="@what",
Replacement:="@with", LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False)

Hope this helps
regards
KM

PS I'm still looking for a proper solution but I think
that the the way you juat call Cells.Replace .... the
application does not know what to do to what sheet in what
workbook

-----Original Message-----
Hi.
I am trying to run the Find/Replace command in Excel

remotely via DDE.
What is the correct syntax for doing this?

I have tried this:

[Cells.Replace What:="@what", Replacement:="@with",

LookAt:=xlPart,
SearchOrder:=xlByRows, MatchCase:=False]

but with no luck.
Is there a list of correct syntaxes for Excel VBA-

commands run via DDE
anywhere? I have searched on the web without finding

anything.

regards,
Bjørn Holm
Nordak as
Norway



.



.



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
Correct syntax for IF, Then in a macro Ken[_2_] Excel Worksheet Functions 5 June 21st 08 06:19 PM
Correct Syntax TeeSee Excel Discussion (Misc queries) 6 February 28th 08 01:36 AM
Correct VBA syntax Ken G. Excel Discussion (Misc queries) 3 December 7th 05 12:35 AM
ListBoxes - correct syntax Bob Phillips[_5_] Excel Programming 0 September 17th 03 02:02 PM
What is correct syntax for a CommandButton? Les[_4_] Excel Programming 1 August 4th 03 08:46 PM


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