run macro1 and note that the below code is not working
If Not sh Is Nothing Then
run macro1 and note that the below code is not working
If Not sh Is Nothing Then
You may try this.....
![]()
Please Login or Register to view this content.
Regards
sktneer
Treat people the way you want to be treated. Talk to people the way you want to be talked to.
Respect is earned NOT given.
sloved with thanks
You're welcome.
If that takes care of your question, please mark your thread as Solved by selecting Thread Tools (just above your first post) --> Mark thread as solved.
Moreover you may also click on * (star) to Add Reputation if the solution provided helped you. This is another way to say thanks.
[QUOTE=sktneer;3818980]You may try this.....
[CODE]
Sub Macro1()
Dim sh As Worksheet
On Error Resume Next
Set sh = Worksheets("Sheet9")
On Error GoTo 0
If Not sh Is Nothing Then
sh.UsedRange.ClearContents
Sheets("Sheet1").Range("A:B").Copy sh.Range("A1")
Else
plse see Snap1.png
if run macro from sheet named djia, it is not working
In that case you may use the code like this.....
![]()
Please Login or Register to view this content.
Cross posted: http://www.vbaexpress.com/forum/show...ise-create-one
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks