AmyCrowder

New Member
Joined
Mar 29, 2016
Messages
1
Hi all,

I am relatively new to VBA and am trying to learn it's limitations.

I have managed to create a user form that creates a new tab with the name entered in the user form text box.

On this new tab, is there a way using VBA to have it equal to the values and formatting of an other tab at the time when the new tab was created?

I don't want this information to update as the original tab does. In essence I am saving the work done on the original tab to a new tab, each time I make a change.

Please let me know if this can be done, or if you need any more information!

Thanks,

Amy
 

Excel Facts

Quick Sum
Select a range of cells. The total appears in bottom right of Excel screen. Right-click total to add Max, Min, Count, Average.
Greetings Amy,

Without seeing how you are setting reference to the newly created worksheet, by simply example:

<font face=Courier New><SPAN style="color:#00007F">Option</SPAN> <SPAN style="color:#00007F">Explicit</SPAN><br>  <br><SPAN style="color:#00007F">Sub</SPAN> example()<br><SPAN style="color:#00007F">Dim</SPAN> ws <SPAN style="color:#00007F">As</SPAN> Worksheet<br><SPAN style="color:#00007F">Dim</SPAN> rngSource <SPAN style="color:#00007F">As</SPAN> Range<br>  <br>  <br>  <SPAN style="color:#00007F">Set</SPAN> rngSource = ThisWorkbook.Worksheets("Sheet5").UsedRange<br>  <br>  <SPAN style="color:#00007F">Set</SPAN> ws = ThisWorkbook.Worksheets.Add(After:=ActiveSheet)<br>  <SPAN style="color:#00007F">With</SPAN> ws<br>    .Name = "Whatever name you chose"<br>    .Range("A1").Resize(rngSource.Rows.Count, rngSource.Columns.Count).Value = rngSource.Value<br>  <SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">With</SPAN><br>  <br><SPAN style="color:#00007F">End</SPAN> <SPAN style="color:#00007F">Sub</SPAN></FONT>

Does that help?

Mark
 
Upvote 0

Forum statistics

Threads
1,213,567
Messages
6,114,344
Members
448,570
Latest member
rik81h

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