G
Guest
Hi,
I am quite new to this so go easy !,
I have the code (donted - thanks) below that will create a new worksheet
with the name changed to some data input by the user.
my question is it possible to 'format' parts of this worksheet ie show data
in cell B13 as 'bold' and to add three 'heading's to 3 different cells.
so by default I want the newly created worksheet to have the following
'standard' settings.
cells D1317 and F13:F17 to be formatted to show values in £
cell D12 to show the word "PRICE" in bold size 12
cell B25 to be text size 20 in colour red and also bold.
is this possible - if so how??
oh yes here is the code I have
Sub NewSheet()
Dim x As Worksheet
Dim y As Worksheet
Dim z As Variant
Set x = ActiveSheet
With Sheets.Add
ActiveSheet.Name = x.Range("B2")
Set y = ActiveSheet
z = Array(x.Range("B2"), x.Range("B4")
y.Range("B3") = z(0) 'NAME
y.Range("D3") = z(1) 'BOOKING REF
End With
MsgBox "Thank You, Order Created Successfully !", vbInformation
End Sub
many many thanks
I am quite new to this so go easy !,
I have the code (donted - thanks) below that will create a new worksheet
with the name changed to some data input by the user.
my question is it possible to 'format' parts of this worksheet ie show data
in cell B13 as 'bold' and to add three 'heading's to 3 different cells.
so by default I want the newly created worksheet to have the following
'standard' settings.
cells D1317 and F13:F17 to be formatted to show values in £
cell D12 to show the word "PRICE" in bold size 12
cell B25 to be text size 20 in colour red and also bold.
is this possible - if so how??
oh yes here is the code I have
Sub NewSheet()
Dim x As Worksheet
Dim y As Worksheet
Dim z As Variant
Set x = ActiveSheet
With Sheets.Add
ActiveSheet.Name = x.Range("B2")
Set y = ActiveSheet
z = Array(x.Range("B2"), x.Range("B4")
y.Range("B3") = z(0) 'NAME
y.Range("D3") = z(1) 'BOOKING REF
End With
MsgBox "Thank You, Order Created Successfully !", vbInformation
End Sub
many many thanks