We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
If FormatCustomer Then Workbooks.Open Filename:="C:\my documents\Customers.xls" 'Format IDs as General Range("C:C,E:E,F:F").Select Selection.NumberFormat = "General" 'Set font to nine pitch Cells.Select With Selection.Font .Name = "Tahoma" .Size = 9 .Strikethrough = False .Superscript = False .Subscript = False .OutlineFont = False .Shadow = False .Underline = xlUnderlineStyleNone .ColorIndex = 1 End With 'Set Columns to autofit Cells.Select Selection.Columns.AutoFit 'Rename tab sheet1 to Customers Sheets("Sheet1").Select Sheets("Sheet1").Name = "Customers" 'Define Name Billto rowa = Sheets("Customers").Cells(Rows.Count, 1).End(xlUp).Row ActiveWorkbook.Names.Add Name:="Billto", RefersToR1C1:="=Customers!R2C2:R" & rowa & "C2" & Chr(32) 'Define Name BillToList rowb = Sheets("Customers").Cells(Rows.Count, 1).End(xlUp).Row ActiveWorkbook.Names.Add Name:="BillToLookup", RefersToR1C1:="=Customers!R2C1:R" & rowb & "C8" & Chr(32) 'Define Name BillToLookup ActiveWorkbook.Names.Add Name:="BillToList", RefersToR1C1:="=OFFSET(Customers!R2C1,0,0,COUNTA(Customers!C1)-1)" 'Protect Customers Worksheet ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True, Password:="password" ActiveSheet.EnableSelection = xlLockedCells 'Go to first cell on worksheet Range("A1").Select 'Save with same name as opened ActiveWorkbook.Save End If
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
Join the community of 500,000 technology professionals and ask your questions.