Don Where do I put the VBA Code?

  • Thread starter Thread starter ABA
  • Start date Start date
A

ABA

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?
 
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
 
"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!
 
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
 
Then having not noticed you had started a second thread my attempt to help
was a waste of time. Stick in one thread!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top