Posts by :-)

    Re: Percentage true value


    You have to 'adjust' the number, especially if it is a percentage


    0.1052 in A1 - formatted as Percentage with 0 decimal places -> displays 11%
    Formula in B1 =ROUND(A1 * 100, 0)

    Quote from royuk

    There is no reason or excuse for being sarcastic when replying to posts.


    http://www.ozgrid.com/forum/sh…02093&p=782267#post782267
    I wasn't being sarcastic, just pointing out a simple fact.


    Anybody, even with the most basic knowledge of VBA would understand the reason for the error. Anyone without that level of understanding should be able to to resolve the issue with a simple search or even a dip into the Help files (remember them?) - the added bonus is that they will learn something and will then be able to catch similar issues themselves in future.


    If they're not competent to do even that then they should seriously question what they are doing in their position.


    So the reply is posted putting the onus on others to save this person the trouble of spending a couple of minutes trying to resolve it themselves.


    The latest post in that thread is yet another example:


    Quote

    will this process slow down the copy paste value?


    The code exists, the poster has a copy of the workbook. All he has to do is make some adjustments to the code to test his query himself. I am assuming he can make those changes.


    However, that's not time efficient for him, best lay it off on someone else while he goes and finds the next simple issue to post on a forum (and he does post on multiple forums, more than once he has 2 or 3 others on each forum, happily chasing around trying to solve his problems for him.


    Another example of time saving on his part

    Quote

    not working

    That is the entire post. My comments on that would not have been as polite as

    Quote from bryce

    Not working? Well good luck to you friend. How about something like: Thanks for trying, when I ran it this is what I saw and compared to my original here is the performance


    It's not that there's a language barrier or inexperience of forums - the person who started that thread has over 900 posts on ExcelForum so he does know what he is doing (as far as posting is concerned).


    Answering questions on forums truly is a mugs game these days. Only 28 posts, and out. Goodbye.

    Re: OzGrid Excruciatingly Slow!


    There is no configuration for TRACERT and it does not change anything on your system. It is an application that simply reports the time taken for each server hop in the path to the site.


    [ATTACH=CONFIG]70850[/ATTACH]


    It's not going to cure issues but might help to show where problems are occurring.

    Re: Search worksheet return hyperlink


    Rough code copied from somewhere ages ago, but it works as long as you add a new worksheet called Summary


    Re: change from date format to different date format


    What you do is determined by the format of the field in the recordset. If defined as a date then VBA should be able to recognise it, if a string ('20161124') then you can use the cDate function to recreate a valid date.


    Code
    1. CellAddress.Value = cDate(Right([FieldName], 2) & "/" & Mid([FieldName], 5, 2) & "/" Left([FieldName], 4))


    'CellAddress' and '[FieldName]' should be replaced by the actual; cell address and DB field names...


    (Assuming your local date format is dd/mm/yyyy)

    Re: Select case works sometimes and not others


    n is always 0 in sub CaseSelect.


    This is because you derclare and initialise it in sub Roster making it local to that procedure. You need to pass the value to CaseSelect


    Code
    1. Call CaseSelect(n)
    2. ' or simply
    3. ' CaseSelect n


    and then change the declaration for CaseSelect

    Code
    1. Sub CaseSelect(n as Integer)


    This type of error can be avoided by using the Option Explicit statement at the top of each module

    Re: 1 Checkbox to hide then unhide multiple sheets.


    It's an issue that has come up before and seems to be one of those 'things' in Excel - one workaround:

    Re: Do While Loop


    Why do you mix a Do/While and a For/Next...? They do just about the same thing, control a loop. You need to check the cell contents.


    Code
    1. For Each cell In rng
    2. If Cell.Value <> vbNullString Then
    3. .... code
    4. End If
    5. Next cell