Hope someone can help me with the following:
I'm trying to make a macro that once pressed will go to a specific cell (lets just say A10) but at the same time will also scroll down to A10 and not just highlight it.
Current setup:
- I have frozen the top two rows so they are always visible
- have content in in rows A4 to A10 going across to column G
- more content in rows A30 to A37 going across to column G - so its not visible on screen as it my screen only shows about 27 rows
- the data in A4 starts one cell below the two frozen rows (A1 and A2) - so A3 is empty
- have recorded a macro that onced pressed will scroll down to A30 but at the same time will keep the look the same (the data is still one cell below the two frozen rows - so the screen shows A1 & A2, A29 - empty cell, A30 - data starts.
- another macro that then goes back up to A4 but again keeps the look the same, so in essence it is working...
UNTIL I manually scroll down or up, and then when I press the macro to go down to A30 it just highlights it wherever it is and doesn't keep the look the same - so onscreen it might now be showing A1 & A2 - frozen, then A24 to A29 empty, and then A30 - data. So the data is further away from the top of the page and more in the middle.
Can anyone help? I'm using excel 2007.
Last edited by sycomadness; 01-14-2010 at 08:44 AM.
Your post does not comply with Rule 1 of our Forum RULES. Your post title should accurately and concisely describe your problem, not your anticipated solution. Use terms appropriate to a Google search. Poor thread titles, like Please Help, Urgent, Need Help, Formula Problem, Code Problem, and Need Advice will be addressed according to the OP's experience in the forum: If you have less than 10 posts, expect (and respond to) a request to change your thread title. If you have 10 or more posts, expect your post to be locked, so you can start a new thread with an appropriate title.
To change a Title on your post, click EDIT then Go Advanced and change your title, if 2 days have passed ask a moderator to do it for you.
Unnecessary wording removed, be sure to read the Forum Rules before posting again
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Why do you want to scroll anywhere,it is usually not necessary to select cells in VBA. Post your code and maybe a dummy workbook
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Sorry about the title - is that better?
Yeah I want to scroll down because all the data is relevant to a specific person but is filed under different headings and it gets a little overbearing when its all on screen at once, so want less clutter and give it a kind of database look and feel.
I had edited the title,it isn't better. Your title should not include unnecessary words like macro
Edited again
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.
If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.
Doing this will ensure you get the result you need!
It doesn't sound like your workbook is set up as a database
Hope that helps.
RoyUK
--------
If you are pleased with a member's answer then use the Star icon to rate it, if you are pleased enough to part with cash consider a donation to Children in Need
For Excel consulting, free examples and tutorials visit Excel Consulting-Excel VBA
Check out the free Excel Toolbar
New members please read & follow the Forum Rules
Remember to mark your questions Solved and rate the answer(s)
Code Tags: Make your code easier for us to read
Made a quick dummy worksheet, hope that shows what I'm trying to sort of do.
- Forgot to add that, I don't want to spread the data over different worksheets as there will already be quite a a lot of them
Last edited by sycomadness; 01-14-2010 at 11:35 AM.
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks