create a new workbook

asyamonique

Well-known Member
Joined
Jan 29, 2008
Messages
1,286
Office Version
  1. 2013
Platform
  1. Windows
Code:
Dim frm As Long
With Sheets("0800")
If .Cells(1, 1).Value = "" Then
frm = 1
Else
frm = .Cells(Rows.Count, 1).End(xlUp).Row + 1
End If
.Cells(frm, 1) = TextBox1.Value
.Cells(frm, 13) = TextBox2.Value
.Cells(frm, 14) = TextBox3.Value
.Cells(frm, 17) = ComboBox1.Value
End Wit

How can be create a new workbook with that code ranges and the same sheet name as well?
 

Excel Facts

Will the fill handle fill 1, 2, 3?
Yes! Type 1 in a cell. Hold down Ctrl while you drag the fill handle.
to assign a sheet name using a cell value



ActiveSheet.Name = Range("B3").Value


</PRE>I don't understand you question about the creating sheets
 
Upvote 0
to assign a sheet name using a cell value



ActiveSheet.Name = Range("B3").Value




</PRE>I don't understand you question about the creating sheets


I do not want to create a sheet.The master file already has that, nd that worksheet will be copied to new fresh workbook file with data which created by the attached code.
Its like it will be continious of that code, after the new data entries the worksheet'0800' will be copy in new workbook with same sheet name..
 
Upvote 0
is this what you mean?
Code:
 Range("a1:o25").Select
    Selection.Copy
    Workbooks.Add
    Worksheets("Sheet1").Activate 'sheet1 of new work book
    Worksheets("Sheet1").Paste
    Range("A1").Activate
ActiveSheet.Name = "0800"
 
Upvote 0

Forum statistics

Threads
1,224,581
Messages
6,179,668
Members
452,936
Latest member
anamikabhargaw

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