• 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. YasserKhalil

    WinHttp WinHttpRequest works only on windows 10

    The same headers and the same code works for windows 10 but not for windows 7 I tried to enable TLS 1.2 but the same problem persists.
  2. YasserKhalil

    WinHttp WinHttpRequest works only on windows 10

    I have the following working code on windows 10 Sub Test() Const sURL As String = "https://oppaapi.emis.gov.eg/api/pl/IsDocumentIdValid" Dim a, ws As Worksheet, sh As Worksheet, http As Object, sNationalID As String, sResp As String Set ws = shINF: Set sh = shSN Set http =...
  3. YasserKhalil

    Splitting single data

    Not so clear logic but try Sub Test() Dim t As Long, x As Long, i As Long t = Range("D4").Value Range("L4:L8").Value = Range("K4:K8").Value For i = 4 To 8 Range("L" & i).Value = Range("L" & i).Value - 1 If Range("L" & i).Value < 0 Then Range("L" & i).Value = 0...
  4. YasserKhalil

    Replace all pictures in a sheet with text OR specific formatting

    @nick_jco Thanks goes to Mr. Marc. This is his code. I just guided you.
  5. YasserKhalil

    Replace all pictures in a sheet with text OR specific formatting

    It is working at my side. You have to put Marc's code in the worksheet module. If you prefer the standard module change it a little Sub Demo1() Dim Pic As Picture Application.ScreenUpdating = False For Each Pic In ActiveSheet.Pictures...
  6. YasserKhalil

    VBA to create Folder Tree - Sub and Super Sub Folders

    Try this code Sub Create_Folders_Tree() Dim ws As Worksheet, sParentFolder As String, sMainFolder As String, sMainFolderPath As String, lr As Long, i As Long, ii As Long, iii As Long Set ws = ThisWorkbook.Sheets("Sheet1") lr = ws.Cells(ws.Rows.Count, "A").End(xlUp).Row...
  7. YasserKhalil

    Fetch data from Company URL

    Try this code Sub Demo() With CreateObject("WinHttp.WinHttpRequest.5.1") .Open "GET", "https://06sogutma.com/", False .setRequestHeader "DNT", "1" On Error Resume Next .send Debug.Print "Phone: " & Trim(Split(Split(.responseText, """>Tel")(1), "<")(0))...
  8. YasserKhalil

    Copy cookie from request headers

    It is working partially till the lawyer id 14785 MsgBox contactLink.getAttribute("href")
  9. YasserKhalil

    Copy cookie from request headers

    Now I got Object doesn't support this method or property at this line contactLink = sBase & Replace(contactLink.getAttribute("href"), "about:", "")
  10. YasserKhalil

    Copy cookie from request headers

    Yes, you are right. I could get some tabular content before getting the error
  11. YasserKhalil

    Copy cookie from request headers

    I am using Office 365 and I got Invalid use of Null at this line MsgBox lastPage.Length
  12. YasserKhalil

    Copy cookie from request headers

    I have faced this error before The solution is to comment these two lines Dim HtmlDoc As HTMLDocument Set HtmlDoc = New HTMLDocument And use these two lines instead Dim HtmlDoc As Object Set HtmlDoc = CreateObject("HtmlFile")
  13. YasserKhalil

    Split unique values add the header to the unique value.

    Greate my tutor. But as for the unique values, I tried only 1 and 4 and 9 so I expected three sub-tables but I got unnecessary tables.
  14. YasserKhalil

    Reorder headers and store into 1d array

    You are great and aweosme. Thank you very much for the incredible support and solutions.
  15. YasserKhalil

    Reorder headers and store into 1d array

    Amazing my tutor. Thank you very much As for Demo3, I tried to get the output to be the number of columns (not the headers text) but I couldn't In fact, the target is to get 1d array of the columns numbers (to use later in reordering the columns) To get what I mean I will use the 1d array like...
  16. YasserKhalil

    Reorder headers and store into 1d array

    No need for a workbook. Only the headers of column A "Header1" .. column B "Header2" and so on The target is to get the columns numbers in an array but in specific order. The non-matching first then the matching ones I already done this by two variables s() and t() and then concatenate both of...
  17. YasserKhalil

    Reorder headers and store into 1d array

    Hello everyone I have the first row with some headers in about 12 columns and I need to search for specific headers from 1d array. a = Array("Header3", "Header5", "Header10") For Each c In Range("A1").CurrentRegion.Rows(1).Cells x = Application.Match(c.Value, a, 0) If...
  18. YasserKhalil

    cell to show choosen RGB color

    Try this code Sub Test() Dim r As Integer, g As Integer, b As Integer, i As Long Application.ScreenUpdating = False With ActiveSheet For i = 2 To .Cells(Rows.Count, "H").End(xlUp).Row If .Cells(i, 8) <> "" And .Cells(i, 9) <> "" And .Cells(i, 10) <> ""...
  19. YasserKhalil

    Macro to create a list

    To make it dynamic replace this line For Each c In Range("A2:A5").Rows with this line For Each c In Range("A2:A" & Cells(Rows.Count, 1).End(xlUp).Row).Rows
  20. YasserKhalil

    Macro to create a list

    Try Sub Test() Dim c As Range, r As Range, cnt As Integer Set r = Range("D1") For Each c In Range("A2:A5").Rows cnt = c.Offset(, 1).Value r.Resize(cnt, 1).Value = c.Value Set r = r.Offset(cnt, 0) Next c End Sub
  21. YasserKhalil

    Can't let a macro populate results when it is used in 64 bit windows whereas it works flawlessly in 32 bit

    Yes the UDF EncodeUriComponent is working well too. I have replaced the existing UDF with the new one and replaced the lines in your code and it works without any problems at all. What is the office version did he have? I have Office 32 Bit version installed in Windows 10 64 Bit.
  22. YasserKhalil

    Can't let a macro populate results when it is used in 64 bit windows whereas it works flawlessly in 32 bit

    Maybe you have to set an object for the element then check if the object is nothing or not .. Something like that On Error Resume Next dim elem as object set elem = Htmldoc.querySelectorAll("a.functionlink[href*='__doPostBack']")(1) On Error Goto 0 If Not elem is Nothing Then ....Do stuff End If
  23. YasserKhalil

    Can't let a macro populate results when it is used in 64 bit windows whereas it works flawlessly in 32 bit

    Try this line like that (maybe solve the problem) elem = Htmldoc.querySelectorAll("a.functionlink[href*='__doPostBack']")(1).getAttribute("href")
  24. YasserKhalil

    Can't let a macro populate results when it is used in 64 bit windows whereas it works flawlessly in 32 bit

    Hello my friend I am using Windows 64 Bit and I tried your code and I got the message "Parcel is in tax sale " at the end so the code is working fine on Windows 10 64 Bit with no problems. Can you specify the error that appears within the person who tested the code?
Back
Top