PC Review


Reply
Thread Tools Rate Thread

how to clear my macro tabulate content?

 
 
Oligo
Guest
Posts: n/a
 
      18th Mar 2009
Sub MakeATable()
Dim myB2Arr As Range
Dim myB4Arr As Range
Dim myB2 As Range
Dim myB4 As Range
Dim myR As Long

Set myB2Arr = Worksheets("Main Data").Range("A10:A13")
Set myB4Arr = Worksheets("Main Data").Range("A3:A5")

For Each myB2 In myB2Arr
For Each myB4 In myB4Arr

Worksheets("calculation").Range("B2").Value = myB2.Value
Worksheets("calculation").Range("B4").Value = myB4.Value

Application.CalculateFull

myR = Cells(Rows.Count, 1).End(xlUp)(2).Row
Cells(myR, 1).Value = myB2.Value
Cells(myR, 2).Value = myB4.Value
Worksheets("calculation").Range("G9:G13").Copy
Cells(myR, 3).PasteSpecial xlValues, Transpose:=True

Next myB4
Next myB2
End Sub

i have this code currently that tabulate a table on a new sheet. currently
i added a play button to run the macro.
my output G9:G13 is dependent on other inputs cells. my question is how do i
clear the previous table for a next set of input change tabulation? ie. i
only want my table to show current data and not build on from past output.
 
Reply With Quote
 
 
 
 
Jacob Skaria
Guest
Posts: n/a
 
      18th Mar 2009
I am not quite sure but is this you are looking for

Range("A2:A10").Clear

If this post helps click Yes
---------------
Jacob Skaria
 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Who clear the MS Macro sheet content? King Microsoft Excel Programming 0 30th Oct 2009 02:24 AM
help needed! how to clear my macro tabulate table Oligo Microsoft Excel Misc 2 18th Mar 2009 01:53 PM
Clear an XML Map of all content DangerMouse Microsoft Excel Programming 1 23rd Jun 2006 02:43 PM
Clear content of a picture box =?Utf-8?B?VXdlIFBvcnNjaA==?= Microsoft C# .NET 2 27th Apr 2005 02:11 PM
Macro to clear content and put back a formula miker1999 Microsoft Excel Programming 1 9th Feb 2004 05:31 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 01:35 PM.