Run time error 13 mistype. how do i stop this? please

andylowekcx

New Member
Joined
Feb 26, 2015
Messages
2
hi i am getting a run time error 13 mistype when i copy a cell from one workbook to another. The cell just contains an address.

on the workbook i am copying to it has some vba running. The code is used to take a name from cell D3 and rename the tab on the bottom.

i am not even adjusting this cell when the error occurs. excel keeps highlighing the a specific line.

bear in mind i am no expert and have tried to put code together using other peoples examples from online.

Code:
Private Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range)
If Target = Range("D3") Then
ActiveSheet.Name = Range("D3").Value
Call SortSheets
Worksheets(Sh.Name).Activate
End If
End Sub[/CODE]

it works normally until i copy.

any help would be greatful.

thanks in advance
 

Excel Facts

How to create a cell-sized chart?
Tiny charts, called Sparklines, were added to Excel 2010. Look for Sparklines on the Insert tab.
maybe i explained it poorly.

in cell D3 i am inputting a customer name and want this to also become the tab name for that sheet.

the address is stored in cell D5 and i am copying this from a list in another excel workbook.

it all works fine if i am typing the customer name and address into the cells but this is time consuming.

is it possible to explain what the new code will do or is doing?
just worried about the target.address.

Thanks for your speedy reply bet this is really basic stuff
 
Upvote 0

Forum statistics

Threads
1,214,588
Messages
6,120,409
Members
448,959
Latest member
camelliaCase

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top