Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help Please... 5

Status
Not open for further replies.

JrClown

Technical User
Oct 18, 2000
393
US
hello VBA experts, I need your help today fellas.

I have an Excel sheet (form) as follows:

Check box Name Project TimeIn TimeDue DataTech

When user have entered 20 entries or so, the 21st entry may be a priority so they check the checkbox. I would like to know how to make this record move up when the box is checked. Any help would be appreciated.

I would also like to know how to sort all entries by timedue field. QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 

DarkSun, the correction you just emailed me works almost great (sorry to keep bugging you).

I typed 2 TimesDue entries:
1. 11:30 am
2. 3:30 pm ----- > I then made this a priority and it was moved up as it should.

Then I made the 11:30 am a priority, and it moved it UP but under the 3:30 pm date and not above as it should.

Any ideas??? I need this to sort by TimeDue


QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
. QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
Any luck DarkSun???
Now I'm getting desperate, I need this tomorrow. QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
Jr Clown:

I take it that you never received the file I sent? It works, I tell you, it works. Only problem is that it's on my home PC, and I'm at work.

LoNeRaVeR
 
LoNeRaVeR, can you read what I told DarkSun two messages ago? that's what's happending with what you sent me the last time.

Here it is again. The code below sets priority to the record when the status field has been activated or marked with a &quot;Y&quot;. It does not sort it by TimeDue





Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Column = 2 Then
Application.ScreenUpdating = False
sRange = ActiveCell.Address
Selection.CurrentRegion.Select
Selection.Sort _
Key1:=Range(&quot;B2&quot;), _
Order1:=xlDescending, _
Key2:=Range(&quot;I2&quot;), _
Order2:=xlDescending, _
Header:=xlYes, _
OrderCustom:=1, _
MatchCase:=False, _
Orientation:=xlTopToBottom
Range(sRange).Select
Application.ScreenUpdating = True
End If
End Sub
QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
Jr Clown:

Please look at my first post for Apr 3, 2001.

1) Copy this code exactly as it shows
2) Open Excel
3) Open your file
3) Press ALT+F11 to open the VBA editor
4) Press Ctrl+R to view the Project Explorer
5) Double-click on Microsoft Excel Objects
6) Double-click on the Sheet where you need to sort the data
7) Paste the code into the Sheet Module

Try it. It works. I just tested it again.

Good Luck,

LoNeRaVeR
 
LoNeRaVeR, it's working great buddy. THANKS FOR YOUR HELP. I'm most appreciative.

One last Question and I leave you alone.
If I place this document on a server for users to access, how can I share it but not protect it. I don't want users to edit it then have to save as something else. There will be upto to 10 users at once using it.

Is this possible?? Thanks QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
Jr Clown:

Never a bother my friend, never a bother! Thanks for letting me know my posts were helpful to you! Now for your question...

Oooo... I really don't like shared workbooks. They always seem to cause more problems than they are worth, but they are sometimes required. Select the Tools menu and then Share Workbook... In the Editing tab click the checkbox to allow changes by more than one user and click the OK button. I would also suggest password protecting your VBA Module so that it doesn't get changed.

This can be done by following these directions:

1) Press ALT+F11
2) Press Ctrl+R if the Project Explorer isn't displayed
3) Right-Click on the any item in that workbook
4) Select the VBA Properties... menu item.
5) Select the Protection tab
6) Click the Lock project for viewing checkbox
7) Enter your password
8) Confirm your password by entering it again
9) Click the OK button

Good Luck with your project, and please let me know if you require any further assistance.

LoNeRaVeR

 
Thanks agin bro. One more addition to my experts list

;-) QUOTE OF THE DAY
Not to know if bad; not to wish to know is worse.
<%
Jr Clown
%>
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top