• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Search results

  1. H

    automate the creation of a XY Scatter chart

    Hi the forum, Since yesterday, I try to solve a problem that combines technical VBA knowledge and programming logic. Context (see attachment) On a spreadsheet, I have 5 information: Prod, Position, Name, ID and Team. The total number of lines, the number of vendors and the number of lines by...
  2. H

    In VBA, how to change the font color in function of the background color

    Hi P45cal, Thank you for the answer. I would never consider using a MOD function to choose a color. This solution meets my wish perfectly. Congratulations for this original suggestion. Have a nice day Harry
  3. H

    In VBA, how to change the font color in function of the background color

    Hi Narayan, I suggest you open the uploaded file "test nuancier" and read the first sheet RMF (read me first). You will understand I cannot give you a specific RGB value as it changes on each selection. Hope this will help. Thanks for your patience Have a nice day Harry
  4. H

    In VBA, how to change the font color in function of the background color

    Hi Narayan, Thanks for your answer. The context is very simple. The procedure reads, in a worksheet, the three RGB values and applies them as forecolor in a shape. The name of the color (also coming from the worksheet) is written in the shape. I try to find a logical reasoning which decides...
  5. H

    In VBA, how to change the font color in function of the background color

    In a VBA procedure, I’m working with shapes. As you can see in the code below, each shape has a colored background With objshp .Select .TextFrame.Characters.Text = Cells(my_row, 3).Value .Fill.ForeColor.RGB = RGB(col_red, col_green, col_blue) End With And some text is written in the...
  6. H

    Problem with DateLastModified

    Hello the forum, Hi Deepak Narayan, First of all, my apologies for this late reply. Thank you to both of you for your response. @Deepak The first solution generates a compiler error The second solution is good but more explicit in the Narayan’s code The third solution works properly...
  7. H

    Problem with DateLastModified

    Hello forum, I want to manipulate image files by transferring them to another folder and changing the name. See the code used. The problem is that on the instruction "ModifiedDate_MyFile MyFile.DateLastModified =" VBA responds with a message "Invalid Procedure". Could a member of the forum...
  8. H

    Distribution of the services of the employees

    Hi Narayan, Thanks for your quick answer. Some more details I'm working as volunteer for a public library and I realize some little Office developments. 1. What are the working hours exactly ? The desk is open from 8 am till 6 pm. To keep it simple, as the employees are working 7 hours/day...
  9. H

    Distribution of the services of the employees

    Hi the forum, I need your help to solve in VBA a problem that bothers me for some time. The problem concerns the planning of 4 employees (named from 1 to 4). Between 02 jan 2014 and 31 dec 2014, for each working day, while one employee begins at 8 am, another stays till 6 pm. The other two...
  10. H

    Scoop of a static variable

    Hi Colin Legg, Thanks for your answer Your explanation allows me to solve the problem. Regards Harry
  11. H

    Scoop of a static variable

    Hi Hui, Thanks for your answer. If I do so, the compiler says "Invalid outside procedure" Regards Harry
  12. H

    Scoop of a static variable

    Hi the forum, A variable is defined as Static in a main procedure. To use it in another procedure, I put the name as a parameter between the parentheses after the name of the procedure in both the call and the sub. But when I try to use the static variable in a event procedure, VBA gives an...
  13. H

    sorting fractions considered by Excel as text

    Hi Narayan, Thanks for your answer. After converting the Exif value with the substitute function, the cell contains a non numeric fraction value, for example "1/50". An in-depth analyze reveals the presence of an hidden (even in the formula bar) "?" character. Sole the len(cell) function with...
  14. H

    sorting fractions considered by Excel as text

    Hi Debraj, Narayan @Debraj I adapted your suggestion in VBA; is working fine except the "+0". It forces a mathematical operation on a text value which leads to an error. See here my code, with myvalue containing the string to analyze; for example "?1/50 sec." myvalue =...
  15. H

    sorting fractions considered by Excel as text

    hi the forum, Let me present a problem to your sagacity. In a spreadsheet, I display some Exif attributes of my picture files The exposure time is expressed as a fraction of a second, eg 1/30 sec, 1/100 sec. After eliminating the "sec" abbreviation, a fractional expression 1/30 or 1/100 remains...
  16. H

    Syntax problem in the SORT function

    Hallo Debraj, In the referenced link I found the solution on my syntax problem. Just add .adress for the variable ColToSort. I saw also that you where learning french. So I conclude this thread with Grand merci pour la réponse pertinente. Have a nice day Harry
  17. H

    Syntax problem in the SORT function

    Hello the forum, I need help to solve a problem of syntax in the SORT function in VBA. I want to sort the contents of a spreadsheet based on a criterion selected from a dropdown list. The sequence of items in the list corresponds to the sequence of column headings. So I set the column to sort by...
  18. H

    PDF to word or excel by vba code

    Hi Nipendra, See the Adobe (negative) answer to such a question. http://forums.adobe.com/thread/1199123 Regards Harry
  19. H

    Disable the close file button

    Hello Narayan, Thank you for the answer. I tried a lookalike code but without success. In fact an inappropriate instruction "Application.EnableEvents = False" prevented activate the event. The problem is solved. Have a nice day Harry.
  20. H

    Disable the close file button

    Hi the forum, Should some people know the VBA instruction(s) to disable the close red cross on the top right of the title bar and force the user to close the file with a button in a worksheet? Thanks in advance Harry
  21. H

    Using the contents of an array in other procedures

    Hello Sam Mathai Chacko, thanks for the reference. In fact I didn't know that a global delaration existed for procedure. I use usually a Public declaration. Hello Shrivallabha, Thanks for your answer. I tested the code as proposed. After adding a I as integer, everything is OK and the...
  22. H

    Using the contents of an array in other procedures

    Hi Narayan, I found the rub. In the workbook_open procedure I create at each run some command buttons. I found by chance: http://support.microsoft.com/kb/231089 and I concluded that adding a button will force the sheet to go in design mode and that is the reason why the variables created after...
  23. H

    Using the contents of an array in other procedures

    Hi Narayan, Some explanation describing the context. In workbook_open I populate the public array variable arrmsg; (wksh is the worksheet containing the text in the 27th column). I remember that the variable is declared in a separated module. Sub workbook_open() …………………some code………………………...
  24. H

    Generate Random number

    Hi Serene, As I don't know anything of the context, I show you an application schema to put in a module. Sub testrand() Dim a As Single a = Rnd * 1000 'to replace by your PIN calculator. Call checkrnd(a) End Sub Function checkrnd(a) If Int(a) < 600 Then Call testrand 'I show what you should do...
  25. H

    Using the contents of an array in other procedures

    Hi Narayan Apologies, I fear that my last question was poorly worded. To explain the public array variable becomes empty in other procedures, there is certainly a reason to VBA act so. That is what I try to understand. Regards Harry
Back
Top