hi,
i want to pause a macro and select a range.w hen am giving activecell. address in default its happening but when i give range.select in default its not happening. i want to understand why not. kindly help
and i also want to know if there is a data in the range i selected and i want to clear it and insert the userrange how to do that
i want to pause a macro and select a range.w hen am giving activecell. address in default its happening but when i give range.select in default its not happening. i want to understand why not. kindly help
and i also want to know if there is a data in the range i selected and i want to clear it and insert the userrange how to do that
Code:
Sub macro2()
'pausing macro
Dim userrange As Range
Dim prompt As String
Dim title As String
prompt = "enter the name"
title = "name"
'the below line where u find default:= range.select is not happening
Set userrange = Application.InputBox(prompt:=prompt, title:=title, Default:=Range.Select, Type:=8)
If userrange = "" Then
MsgBox "cancelled"
Else
userrange = "=rand()"
End If