Hello everyone.
I would be really grateful for some help.
I have been teaching some basic macros to others. In one macro it is necessary to search through a list of 6 names. To take advantage of the record macro function in excel, i use the 'find' function from the icon ribbon.
This records the following (ranges edited after):
Range("forecastdata").Select
Selection.Copy
Range("schemecell").Select
Selection.Find(What:=Range("analysed_scheme").Text, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 7).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Is the ability for excel to record this function impacted by anything. I have a query from some one recently saying it would not record for them. They sent me their file and, sure enough, on their file the macro would not record this code. Yet as soon as I saved as and reopened the file on my PC, i was able to record the code on my own computer. What could be causing this?
I am aware they are ways to record this macro, however i need this to be simple as possible for my learners and everyone use the same method.
Could it be an old version of excel, or a settling i am unaware of?
correct code example recorded (and slightly edited afterwards) on my PC
Range("forecastdata").Select
Selection.Copy
Range("schemecell").Select
Selection.Find(What:=Range("analysed_scheme").Text, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 7).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
code recorded by learner using the same steps (lots of code line do not record like mine):
Range("J13:K13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("P10").Select
Thanks.
I would be really grateful for some help.
I have been teaching some basic macros to others. In one macro it is necessary to search through a list of 6 names. To take advantage of the record macro function in excel, i use the 'find' function from the icon ribbon.
This records the following (ranges edited after):
Range("forecastdata").Select
Selection.Copy
Range("schemecell").Select
Selection.Find(What:=Range("analysed_scheme").Text, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 7).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Is the ability for excel to record this function impacted by anything. I have a query from some one recently saying it would not record for them. They sent me their file and, sure enough, on their file the macro would not record this code. Yet as soon as I saved as and reopened the file on my PC, i was able to record the code on my own computer. What could be causing this?
I am aware they are ways to record this macro, however i need this to be simple as possible for my learners and everyone use the same method.
Could it be an old version of excel, or a settling i am unaware of?
correct code example recorded (and slightly edited afterwards) on my PC
Range("forecastdata").Select
Selection.Copy
Range("schemecell").Select
Selection.Find(What:=Range("analysed_scheme").Text, After:=ActiveCell, LookIn:=xlFormulas _
, LookAt:=xlPart, SearchOrder:=xlByRows, SearchDirection:=xlNext, _
MatchCase:=False, SearchFormat:=False).Activate
ActiveCell.Offset(0, 7).Activate
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
code recorded by learner using the same steps (lots of code line do not record like mine):
Range("J13:K13").Select
Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
:=False, Transpose:=False
Application.CutCopyMode = False
Range("P10").Select
Thanks.