ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Pause Macro to enter data in cell (https://www.excelbanter.com/excel-programming/299812-re-pause-macro-enter-data-cell.html)

Frank Kabel

Pause Macro to enter data in cell
 
Hi
within you macro use application.inputbox
and set the type:=8 to get a range
use this range as target cell

--
Regards
Frank Kabel
Frankfurt, Germany


rleonard wrote:
I have macro that goes to a cell then copies data; then using goto i
go to a general area;

at this point i need to manually locate where i want to paste data,
after which I want macro to resume.

Is their a way to pause macro?

thanks Bob Leonard



rleonard[_2_]

Pause Macro to enter data in cell
 
After using macro goto function, how do i write line of code using application.inputbox set to tybe:=8

i trie
application.inbutbox(enter, type:=8

all i get is error messages, need hel

thank
Bob Leonar


Frank Kabel

Pause Macro to enter data in cell
 
Hi
try something like
dim ret_value as range
set ret_value=application.inbutbox("select a range", type:=8)


--
Regards
Frank Kabel
Frankfurt, Germany


rleonard wrote:
After using macro goto function, how do i write line of code using
application.inputbox set to tybe:=8?

i tried
application.inbutbox(enter, type:=8)

all i get is error messages, need help

thanks
Bob Leonard


rleonard[_2_]

Pause Macro to enter data in cell
 
Hi Frank
Thanks for you help, but I can not get my selection paste special to work
Following is my code

MsgBox "From GoTo Box, Select 'Sub Data' To Copy
Application.Dialogs(xlDialogFormulaGoto).Sho
Selection.Cop

MsgBox "From GoTo Box, Select 'GROUP' to Copy Sub Data to
Application.Dialogs(xlDialogFormulaGoto).Sho

Dim ret_value As Rang
Set ret_value = Application.InputBox("select a range", Type:=8
Application.Goto reference:=ret_value ' I added this line of code to display starting cell of rangr I had selected w/inputbox
ActiveCell.Activate ' I added this line of code, hoping it would make cell selected work w/selection paste special

ans = MsgBox(" Is this correct cell to enter Sub Score", vbYesNo)
If ans = vbNo Then _
Exit Sub
' Above code appears to work, but I receive error msg with following paste special code!
Selection.PasteSpecial Paste:=xlValues, Operation:=xlNone, SkipBlanks:= _
False, Transpose:=False

What do I have to change to allow macro paste data statrting at cell selected
The code i am pasting is 4 cell wide ex

col a col b col c col
sub01 joe blow 50 4

thanks again for your hel
Bob Leonar


rleonard[_2_]

Pause Macro to enter data in cell
 
Hi Frank
Did you see my reply to your last suggestion re not being able to use selection paste special to paste data copied int
cell selected by msgbox
Bob Leonard


All times are GMT +1. The time now is 09:55 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com