![]() |
|
#1
|
|||
|
|||
|
I'm modifying some existing code to clear the contents of worksheet "RDBMerge" and then to set this worksheet as a variable called DestSh.Name
I've managed to clear the contents, but I need help with the second part to set it as a variable instead of creating a new RDBMerge worksheet. ' Clear the summary sheet. Application.DisplayAlerts = False On Error Resume Next Sheets("RDBMergeSheet").UsedRange.ClearContents On Error GoTo 0 Application.DisplayAlerts = True ' Add a new summary worksheet. Set DestSh = ActiveWorkbook.Worksheets.Add DestSh.Name = "RDBMergeSheet" |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Run Time Error '91': Object variable or With block variable not set using Catalogue Mailmerge | Berryblue | Mail Merge | 1 | 11-13-2014 05:36 PM |
Run-time error 91 object variable or with block variable not set
|
JUST ME | Word VBA | 4 | 03-25-2014 06:56 AM |
object variable or with block variable not set
|
MJP143 | Excel | 1 | 02-11-2013 05:07 AM |
| Variable to rename a tab in a worksheet via VBA | Chayes | Excel Programming | 5 | 08-07-2012 02:03 AM |
Run-time error '91': Object variable or With block variable not set
|
tinfanide | Excel Programming | 2 | 06-10-2012 10:17 AM |