Hi
Replace Str with Cstr
and you need
Sheets("Shared Emp Master Sheet").Activate
Range(selRange).Select
Selection.Delete Shift:=xlUp
better still do
Sheets("Shared Emp Master Sheet").Range(selRange).Delete Shift:=xlUp
regards
Paul
On Feb 25, 3:27*pm, MichaelJohnson...@hotmail.com wrote:
> *I have a button on a worksheet that when pressed is supposed to:
>
> 1. Go to another worksheet in the same workbook
> 2. Select a range of cells in that worksheet
> 3. Delete the selected range of cells
>
> However I am getting the following error message:
>
> "Select method of Range class failed" when the code executes --
> Range(selRange).Select--
>
> Can someone inform me of how I can fix this? Thanks in advance
>
> The code segemnt is below
>
> ------------------------------------
> selEnd = readRow - 1
>
> selRange = "A" + Trim(Str(selBegin))
>
> selRange = selRange + ":" + "F" + Trim(Str(selEnd))
>
> Sheets("Shared Emp Master Sheet").Select
>
> Range(selRange).Select * * * *<- ERROR OCCURS HERE
>
> Selection.Delete Shift:=xlUp
> ------------------------------------
|