The following is my code. Maybe I'm too tired since it's 4:50 am. Everything else in the code works correctly.
Please Login or Register to view this content.
The following is my code. Maybe I'm too tired since it's 4:50 am. Everything else in the code works correctly.
Please Login or Register to view this content.
Last edited by Launchnet; 12-13-2011 at 03:51 PM.
Thanks for helping . . .
Matt @ Launchnet
Application.ScreenUpdating will prevent the flickering caused by the screen updating, it can improve code efficiency. I didn't really notice any movement with your code. However, this code doesn't select the ranges & therefore will work more smoothly.
Please Login or Register to view this content.
Hope that helps.
RoyUK
--------
For Excel Tips & Solutions, free examples and tutorials why not check out my web site
Free DataBaseForm example
Good Morning RoyUK . . .
Thanks for the very Clean code. Works like a charm.
When I went back to sleep around 5 am here in California, I woke up later with an enhancement if possible.
It would be nice to have a dual function on my macro button, just like a toggle switch.
1st click would do exactly as current code.
2nd click would unhide all columns
If this is not possible, I will have to have a separate button that does it, which I can code.
No need to read the following unless you want to see a brief description of what our database does, if you are interested.
By the way, there are approximately 24 different buttons on my Dashboard that selects 24 different Ministries in our church. Each button selects a different range that is used by that particular Ministry. I will copy the code to each Ministry button and simply change the range.
I have been told that with all these columns, the program could become unruly, but with this type of selection, the user only deals with the 6 to 10 columns at a time. It really works great. In the Men's Ministry, we even track attendance with a double-click of the mouse for each person in weekly attendance. Then, when all attendees have an x in the attendance column, I click another button that calculates # of times attended in a row - or - how many misses in a row, plus year-to-date attendance.
We can send emails, print reports, and the list goes on. We can even track and eliminate sending any particular email going to a member that elects to not receive 1 or more of the 10 different types of emails we send out.
And the features go on and on.
I've really enjoyed building this database.
And, I really appreciate all the help everyone has given me.
With much respect.
Matt
Do you mean
Please Login or Register to view this content.
RoyUK . . .
Great Code . . .
Question . . . Inserting code on Quick Reply. I can't find the symbol that gives the background around code like when I write a new thread.
All 3 lines of code are very clean and work perfectly.
Many thanks.
OK, I just looked at reply and I find the # function. I assume that if entering code I have to go thru Reply.
Thanks
It was working fine until I added a 2nd macro . . . See Below
There must be a conflict of some kind. I can't see why.Please Login or Register to view this content.
Sorry if you seen my note stating there was a conflict.
My problem. I linked the second macro to the wrong macro.
Very Very Sorry
Your post does not comply with Rule 9 of our Forum RULES. If you solve a problem yourself before anyone else has responded, please take a moment to describe your solution, chances are some other member will benefit. And please never edit a thread in which someone else has responded.
How to mark a thread Solved
Go to the first post
Click edit
Click Go Advanced
Just below the word Title you will see a dropdown with the word No prefix.
Change to Solved
Click Save
RoyUK . . .
Good Morning
I need to re-open this thread, but I'm not sure how to. So, I am explaining my problem below in hope that you will see it. I am also going to send you a personal note on how to do this.
Matt
The reason I marked this Thread SOLVED, was because it worked perfect with your single line of code. But, now I have made a second macro with the same code, with different ranges. Now, I have problems if I don't use the same macro to return to home position (no columns hid).
Users are bound to jump between macros so this is a problem.
Attach the workbook & I'll take a look
Good Morning from California royuk . . .
I wish I had used a better title, the screen movement or shaking has gone away, but the macros that we were and are talking about still has a problem.
If I were to send you a copy of my workbook, you would have so many questions that I think it best that I 1st try to give you a better description. A sample workbook would also be difficult to produce.
The # sign followed by a number value is referring to different Replys on the Post.
#2 Works Good
Then I asked for the same action, but I wanted the macro to have a toggle function.
#3 I tried to just give you some general overview or info on the things happening in my program
#4 Works perfect
#7 Since the one macro that you started with was so good, I attempted to have 2 macro buttons with different ranges to be hidden. Actually, when finished, the program will have 24 different buttons (macros) on the Dashboard. I added the Range line of code as the cell selection sometimes was hidden along with the columns hidden.
If I click the button (macro) "GoToMensMinistry" it works perfectly. The correct columns are hidden.
If I click the same button a second time it works perfectly. All columns are displayed.
Same is true on "GoToCompanyInfo" if I do exactly the same as done with "GoToMensMinistry. It works perfect.
MY PROBLEM . . .
Example: If I click "GoToMensMinistry" and then the user does not click it a second time, but instead clicks "GoToCompanyInfo" the range to be hidden selection gets mixed up. Sometimes if I go back and forth between these 2 macros, I get the display of the opposite macro. It's in consistent.
If the user always clicked the same button to return to home base, there would not be a problem. But, users don't always do what they are supposed to.
If I keep each macro seperate as in #4, I would have to add a line of code at the beginning of the macro to 1st clear all hidden columns. Then, I would need a single button that would clear all hidden columns and return to home position, other wise the user could not unhide hidden columns. This I could do.
I hope this is more enlightening.
5:45 am and I'm going back to bed for about 2 hours moe sleep.
Thanks Roy
1. you'd better specify the sheet you are working in.
2. use simpler code:
to unhide all columns:
3. Like:Please Login or Register to view this content.
Please Login or Register to view this content.
Please Login or Register to view this content.
The following 3 macros does the job. I added a Button to unhide all columns. This is necessary to unhide all hidden columns and select column A - same row which is considered being at home on the same rown that was last used.
On the other 2 macros I added the 1st row of code in each of the other 2 macros
I will test for a few days and if it continues to work perfectly, I will mark the Thread SOLVED.Please Login or Register to view this content.
Many Thanks
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks