![]() |
Don Where do I put the VBA Code?
I got into excel and went into Microsoft Visual Basic I pasted the code in
VBAProject in Sheet 3(Code) But my spreadsheet did not change. What am I doing wrong? -- ABA |
Don Where do I put the VBA Code?
Did you run your code?
Is it worksheet code or does it need to be in a general module? Can we see your code? Mike "ABA" wrote: I got into excel and went into Microsoft Visual Basic I pasted the code in VBAProject in Sheet 3(Code) But my spreadsheet did not change. What am I doing wrong? -- ABA |
Don Where do I put the VBA Code?
"Don" Answered my original post and - Gave me this posted code-
Sub hiderowslessthanzero() mc = "a" Rows.Hidden = False For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i, mc) < 0 Then Rows(i).Hidden = True Next i End Sub **I needed step by step directions on how to use this. I do not know how to run it, where to paste it. I took a guess and tried pasting this in VBA Projects but Honestly I am clueless and have no idea what I am doing. If you have the time to give me instructions I would really appreciate it. THANK YOU IN ADVANCE! -- ABA "Mike H" wrote: Did you run your code? Is it worksheet code or does it need to be in a general module? Can we see your code? Mike "ABA" wrote: I got into excel and went into Microsoft Visual Basic I pasted the code in VBAProject in Sheet 3(Code) But my spreadsheet did not change. What am I doing wrong? -- ABA |
Don Where do I put the VBA Code?
1. ALWAYS stay in the original thread instead of starting a new one.
2. This code is not automatic. You must fire it. One way is to place your cursor anywhere in the code and then touch the f5 key. If you're new to macros, you may want to read David McRitchie's intro at: http://www.mvps.org/dmcritchie/excel/getstarted.htm -- Don Guillett Microsoft MVP Excel SalesAid Software "ABA" wrote in message ... I got into excel and went into Microsoft Visual Basic I pasted the code in VBAProject in Sheet 3(Code) But my spreadsheet did not change. What am I doing wrong? -- ABA |
Don Where do I put the VBA Code?
Then having not noticed you had started a second thread my attempt to help
was a waste of time. Stick in one thread! "ABA" wrote: "Don" Answered my original post and - Gave me this posted code- Sub hiderowslessthanzero() mc = "a" Rows.Hidden = False For i = Cells(Rows.Count, mc).End(xlUp).Row To 2 Step -1 If Cells(i, mc) < 0 Then Rows(i).Hidden = True Next i End Sub **I needed step by step directions on how to use this. I do not know how to run it, where to paste it. I took a guess and tried pasting this in VBA Projects but Honestly I am clueless and have no idea what I am doing. If you have the time to give me instructions I would really appreciate it. THANK YOU IN ADVANCE! -- ABA "Mike H" wrote: Did you run your code? Is it worksheet code or does it need to be in a general module? Can we see your code? Mike "ABA" wrote: I got into excel and went into Microsoft Visual Basic I pasted the code in VBAProject in Sheet 3(Code) But my spreadsheet did not change. What am I doing wrong? -- ABA |
All times are GMT +1. The time now is 04:51 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com