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

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not seem to
work
--
Felix
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Stopping a Macro

You could try InputBox function to get user input and populate the required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not seem to
work
--
Felix

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Stopping a Macro

Thank you,

will this stop the Macro and resume after entry?
--
Felix


"OssieMac" wrote:

You could try InputBox function to get user input and populate the required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not seem to
work
--
Felix

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Stopping a Macro

The macro will wait until input is complete, and then will pick up after
that input (or Cancel).

You need to code for the result. Look it up in help.

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Felix" wrote in message
...
Thank you,

will this stop the Macro and resume after entry?
--
Felix


"OssieMac" wrote:

You could try InputBox function to get user input and populate the
required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait
until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not
seem to
work
--
Felix



  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Stopping a Macro

I tried the folling statement:

=INPUT("Enter Data",1)

but there is an error: "Expects #"


I want simply go to Cell A6, wait for an entry and resume with the Macro.


--
Felix


"OssieMac" wrote:

You could try InputBox function to get user input and populate the required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not seem to
work
--
Felix



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Stopping a Macro

You are in the programming group, so it is InputBox, and it is VBA

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Felix" wrote in message
...
I tried the folling statement:

=INPUT("Enter Data",1)

but there is an error: "Expects #"


I want simply go to Cell A6, wait for an entry and resume with the Macro.


--
Felix


"OssieMac" wrote:

You could try InputBox function to get user input and populate the
required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait
until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not
seem to
work
--
Felix



  #7   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Stopping a Macro

Thank you!

the following

Sub EnterData()
'
' EnterData Macro
' Macro grabada el 14.08.2007 por fak
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)

Application.Goto Reference:="R5C8"

End Sub


works fine, Macro goes to A1, displays Box (without "Enter"...), but when I
fill in a value in the box, it is not accepted in cell A1. The macro then
continues going to A5.

It also asks for a "prompt" and default.


--
Felix


"Bob Phillips" wrote:

You are in the programming group, so it is InputBox, and it is VBA

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Felix" wrote in message
...
I tried the folling statement:

=INPUT("Enter Data",1)

but there is an error: "Expects #"


I want simply go to Cell A6, wait for an entry and resume with the Macro.


--
Felix


"OssieMac" wrote:

You could try InputBox function to get user input and populate the
required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait
until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not
seem to
work
--
Felix




  #8   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 244
Default Stopping a Macro

On 14 Aug, 10:48, Felix wrote:
Thank you!

the following

Sub EnterData()
'
' EnterData Macro
' Macro grabada el 14.08.2007 por fak
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)

Application.Goto Reference:="R5C8"

End Sub

works fine, Macro goes to A1, displays Box (without "Enter"...), but when I
fill in a value in the box, it is not accepted in cell A1. The macro then
continues going to A5.

It also asks for a "prompt" and default.

--
Felix



"Bob Phillips" wrote:
You are in the programming group, so it is InputBox, and it is VBA


--
HTH


Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)


"Felix" wrote in message
...
I tried the folling statement:


=INPUT("Enter Data",1)


but there is an error: "Expects #"


I want simply go to Cell A6, wait for an entry and resume with the Macro.


--
Felix


"OssieMac" wrote:


You could try InputBox function to get user input and populate the
required
cell from the input.


Regards,


OssieMac


"Felix" wrote:


I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait
until
a value is entered and have the macro continue. (after ENTER ?)


I tried something with the PAUSE / RESUME commands, but it does not
seem to
work
--
Felix- Hide quoted text -


- Show quoted text -


try

range("A1").value=inputbox("enter")

  #9   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 78
Default Stopping a Macro

Thank you, I tried the following:


Sub EnterData()
'
' EnterData Macro
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)
Range("A1").Value = InputBox("enter")
Application.Goto Reference:="R8C5"
End Sub

Result: The value entered in the box (a number) is not in A1, however, the
word "enter" is now written onto the box.

I would need: The text "Please enter value" on the box and a numeric value
be put is cell A1.
--
Felix


" wrote:

On 14 Aug, 10:48, Felix wrote:
Thank you!

the following

Sub EnterData()
'
' EnterData Macro
' Macro grabada el 14.08.2007 por fak
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)

Application.Goto Reference:="R5C8"

End Sub

works fine, Macro goes to A1, displays Box (without "Enter"...), but when I
fill in a value in the box, it is not accepted in cell A1. The macro then
continues going to A5.

It also asks for a "prompt" and default.

--
Felix



"Bob Phillips" wrote:
You are in the programming group, so it is InputBox, and it is VBA


--
HTH


Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)


"Felix" wrote in message
...
I tried the folling statement:


=INPUT("Enter Data",1)


but there is an error: "Expects #"


I want simply go to Cell A6, wait for an entry and resume with the Macro.


--
Felix


"OssieMac" wrote:


You could try InputBox function to get user input and populate the
required
cell from the input.


Regards,


OssieMac


"Felix" wrote:


I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait
until
a value is entered and have the macro continue. (after ENTER ?)


I tried something with the PAUSE / RESUME commands, but it does not
seem to
work
--
Felix- Hide quoted text -


- Show quoted text -


try

range("A1").value=inputbox("enter")


  #10   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Stopping a Macro

Hi Felix,

Sorry I did not get back to you sooner. It looks like you need a little more
help than just a pointer in the right direction.

The following is an example of using InputBox with handling user cancelling
instead of entering data. Note that clicking OK on InputBox without entering
data is the same as clicking cancel.

Sub Input_Data()
Dim exitInput As Boolean
Dim msgResponse

exitInput = False

Range("A1").Select

Do While exitInput = False

Range("A1").Value = InputBox("Enter data for cell A1")

If Range("A1") = "" Then
msgResponse = MsgBox("You cancelled without entering data" _
& Chr(13) & "Click Yes if you meant to cancel or" _
& Chr(13) & "No if you still want to enter data", vbYesNo)

If msgResponse = vbNo Then
exitInput = False
Else
exitInput = True
End If
Else
exitInput = True
End If
Loop

End Sub

Regards,

OssieMac



"Felix" wrote:

Thank you, I tried the following:


Sub EnterData()
'
' EnterData Macro
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)
Range("A1").Value = InputBox("enter")
Application.Goto Reference:="R8C5"
End Sub

Result: The value entered in the box (a number) is not in A1, however, the
word "enter" is now written onto the box.

I would need: The text "Please enter value" on the box and a numeric value
be put is cell A1.
--
Felix


" wrote:

On 14 Aug, 10:48, Felix wrote:
Thank you!

the following

Sub EnterData()
'
' EnterData Macro
' Macro grabada el 14.08.2007 por fak
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)

Application.Goto Reference:="R5C8"

End Sub

works fine, Macro goes to A1, displays Box (without "Enter"...), but when I
fill in a value in the box, it is not accepted in cell A1. The macro then
continues going to A5.

It also asks for a "prompt" and default.

--
Felix



"Bob Phillips" wrote:
You are in the programming group, so it is InputBox, and it is VBA

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Felix" wrote in message
...
I tried the folling statement:

=INPUT("Enter Data",1)

but there is an error: "Expects #"

I want simply go to Cell A6, wait for an entry and resume with the Macro.

--
Felix

"OssieMac" wrote:

You could try InputBox function to get user input and populate the
required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait
until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not
seem to
work
--
Felix- Hide quoted text -

- Show quoted text -


try

range("A1").value=inputbox("enter")




  #11   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,510
Default Stopping a Macro

Hi again Felix,

Just a little extra for you. I'll point out the problems with the macro you
posted.

Application.Goto Reference:="R1C1"

InputBox (Enter) 'This line is NOT correct and not required. (Delete it.)

'In the following line A1 is assigned the value that you enter in the
InputBox.
Range("A1").Value = InputBox("Please enter value")
Application.Goto Reference:="R8C5"

Note: You are entering the value in the input box and not trying
to enter a value directly in the cell A1 aren't you because you cannot
enter it directly in the cell; it must be in the input box and the code
then assigns the value to the cell.

The message between the double quotes in the InputBox function can be
any message you like. I have edited yours to what you requested.

You could use the above code if you do not want any validation of whether
the user actually enters data.

Regards,

OssieMac

"Felix" wrote:

Thank you, I tried the following:


Sub EnterData()
'
' EnterData Macro
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)
Range("A1").Value = InputBox("enter")
Application.Goto Reference:="R8C5"
End Sub

Result: The value entered in the box (a number) is not in A1, however, the
word "enter" is now written onto the box.

I would need: The text "Please enter value" on the box and a numeric value
be put is cell A1.
--
Felix


" wrote:

On 14 Aug, 10:48, Felix wrote:
Thank you!

the following

Sub EnterData()
'
' EnterData Macro
' Macro grabada el 14.08.2007 por fak
'
'
Application.Goto Reference:="R1C1"
InputBox (Enter)

Application.Goto Reference:="R5C8"

End Sub

works fine, Macro goes to A1, displays Box (without "Enter"...), but when I
fill in a value in the box, it is not accepted in cell A1. The macro then
continues going to A5.

It also asks for a "prompt" and default.

--
Felix



"Bob Phillips" wrote:
You are in the programming group, so it is InputBox, and it is VBA

--
HTH

Bob

(there's no email, no snail mail, but somewhere should be gmail in my addy)

"Felix" wrote in message
...
I tried the folling statement:

=INPUT("Enter Data",1)

but there is an error: "Expects #"

I want simply go to Cell A6, wait for an entry and resume with the Macro.

--
Felix

"OssieMac" wrote:

You could try InputBox function to get user input and populate the
required
cell from the input.

Regards,

OssieMac

"Felix" wrote:

I read in an old Microsoft Excel "Function Reference Book" that it is
possible to stop a running Macro (at a particular cells or cells), wait
until
a value is entered and have the macro continue. (after ENTER ?)

I tried something with the PAUSE / RESUME commands, but it does not
seem to
work
--
Felix- Hide quoted text -

- Show quoted text -


try

range("A1").value=inputbox("enter")


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
Macro stopping for one user out of 14 David Vollmer[_2_] Excel Programming 2 April 3rd 06 07:51 PM
Stopping a Macro Samir[_3_] Excel Programming 6 March 6th 06 04:14 PM
Stopping a Macro Paul Excel Programming 2 December 7th 05 02:11 PM
stopping macro DPK Excel Programming 3 May 13th 04 06:50 AM
My Macro keeps stopping?? Sh0t2bts Excel Programming 5 October 28th 03 03:08 PM


All times are GMT +1. The time now is 12:24 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"