Excel does give a warning when saving but it is too easy to just select the default of saving without macros. Which is the best place to store it depends on how you will be using the workbook/distributing the workbook, and is a whole discussion in its own right. Range("L1") (this can be all on one line but I broke the line for display purposes)As this does not use the Selection object or method the display will not change. I use statements like:var1=range(c1,c2).valuefor i=lbound(var,1) to ubound(var,2)var(i,1)=sqr(var(i,1))next irange(c1,c2).formula=var1range(c1,c2)...If this is not then case then look at when recording a macro you are initially required to name the macro, any shortcut key, AND crucially where it is to be stored. As a newbie to macros I suggest you select "This Workbook" for simplicity. Paste With a single line of code: Sheets("Repair Evaluation Data"). I"m new to macros in excel and finding that they are extremely helpful, but have run into a knowledge issue.. Auto Filter _ Field:=8, Criteria1:=Range(Drop Down). Your macro can access any cells in the workbook, unless the worksheet containing the cell is hidden.
@M3NT4LYou can replace the code: Sheets("Repair Evaluation Data").
If so, is Hiding the Developer tab sufficient for keeping users out of the source code? @JMJ: You actually don't need to reset Application. The same can be said of local object variables (ranges, worksheets, etc); some people consider it "good coding practice" to clear out and reset everything at the end of the macro, but other people point out the VBA garbage cleaner is going to do this for you anyway! Many of my subroutines are written generically, so that the same code can run on different sheets.
@Ramanathan Hiding the worksheet is easy you can just create a button on each worksheet you want to be able to hide and assign it the macro: Sub Hide Sheet() Activesheet.visible=xl Sheet Very Hidden End Subput this macro in a code module. Screen Updating to True at the end, because it is automatically set to True when code stops executing (a few other settings reset as well... You said "Make sure that before ending the macro, however, you set the Screen Updating property back to True."In fact, I never, ever, noticed any difference when doing so or omitting this instruction: When the macro ends, the screen can be refreshed anyway! To do this, I rely heavily on the "Activesheet" object.
Hi, I am also very new to macros, though I have been using excel for over a decade - I just felt that I never needed macros and have been dodging the bullet for awhile. It works, but it does not hide the screen switches and I need to hide the sheets. Thanks Private Sub Worksheet_Change(By Val Target As Range) Const Drop Down = "c4" Const Table Sheet = "Repair Evaluation Data" Const Table Range = "A1" If Not Intersect(Range(Drop Down), Target) Is Nothing Then Application.
However, I realise that I need it and Im stuck at the 1st huddle. My issue is every time I close and reopen the file and try to run the macro, its no where to be found.