Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Still need some help with nested macro.

I am using a password protected macro ("PPM") within a macro I am
attempting to write. Unfortunately the PPM has two pop up screens
that require keyboard responses, in this case, simply hitting the
"Enter" key twice. It was previously suggested that I use "SendKeys"
statements, but I haven't been able to get those to work (which is an
admission of my limited ability rather than an impeachment of the
advice).

I have copied my macro below. It runs just fine except that the PPM
"MacroResetWeights" halts everything until I hit the Return key twice.
What can I add to my macro to avoid the manual keyboard entries?

'
For I = 1 To 110
Range("BK10").Select
Range("BK10").Value = I
Range("BK11").Select
Application.Run Range("NEURLYST.XLM!MacroResetWeights")
Application.Run Range("NEURLYST.XLM!MacroTrainNetwork")
Sheets("Training Data").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1:O1").Select
Selection.Copy
Selection.End(xlDown).Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Any Chord").Select
Next I
'
End Sub
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1,092
Default Still need some help with nested macro.

Try this:
Application.Run Range("NEURLYST.XLM!MacroResetWeights")
SendKeys "{ENTER}", True
SendKeys "{ENTER}", True

Let us know if that works
Mike F
wrote in message
...
I am using a password protected macro ("PPM") within a macro I am
attempting to write. Unfortunately the PPM has two pop up screens
that require keyboard responses, in this case, simply hitting the
"Enter" key twice. It was previously suggested that I use "SendKeys"
statements, but I haven't been able to get those to work (which is an
admission of my limited ability rather than an impeachment of the
advice).

I have copied my macro below. It runs just fine except that the PPM
"MacroResetWeights" halts everything until I hit the Return key twice.
What can I add to my macro to avoid the manual keyboard entries?

'
For I = 1 To 110
Range("BK10").Select
Range("BK10").Value = I
Range("BK11").Select
Application.Run Range("NEURLYST.XLM!MacroResetWeights")
Application.Run Range("NEURLYST.XLM!MacroTrainNetwork")
Sheets("Training Data").Select
Range("A1").Select
Selection.End(xlDown).Select
ActiveCell.Offset(0, 1).Range("A1:O1").Select
Selection.Copy
Selection.End(xlDown).Select
Selection.End(xlDown).Select
ActiveCell.Offset(1, 0).Range("A1").Select
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone,
SkipBlanks:= _
False, Transpose:=False
Application.CutCopyMode = False
ActiveCell.Offset(1, 0).Range("A1").Select
Sheets("Any Chord").Select
Next I
'
End Sub



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default Still need some help with nested macro.

I appreciate your help, Mike, but I am afraid the problem remains. I
still get the two prompt screens which I have to satisfy with manual
entries (although I didn't get any of the bizzare run errors generated
by some of the permutations I tried)!

I ran accross a "SendKeys Method" in Excel's VBA Help which places
keystrokes in a key buffer (haven't seen that used in quite a while).
It then goes on to say

In some cases you must call this method before
you call the method that will use the keystrokes.
For example, to send a password to a dialog
box, you must call the SendKeys method before
you display the dialog box.

Intuitively, I am inclined to think "the method" might do the trick,
but at my level of understanding this two sentence explanation has
left me scratching my head.

Thanks,
Eric
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
Pilgrim needs help: Effecting keystroks required by a macro nested within a macro. [email protected] Excel Programming 1 May 14th 05 03:46 AM
Function Macro for Nested IF Qaspec Excel Worksheet Functions 5 March 10th 05 07:25 PM
Nested Subtotal and Macro Tom Ogilvy Excel Programming 3 August 31st 04 07:02 PM
Nested IF absolute referencing macro Renegade Snail[_4_] Excel Programming 5 February 28th 04 08:15 PM
Nested Looping with Tests, Row Copying Macro Tom Gerber Excel Programming 3 October 16th 03 09:04 PM


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