• 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. Kenneth Hobson

    PASTING BETWEEN SHEETS TO NEXT EMPTY ROW

    For Transpose, set to False.
  2. Kenneth Hobson

    VBA from SharePoint folder to local path folder excel

    For some sharepoint sites, some have found this method to work. Assign the path to a virtual drive. You may need to remove the http part to make a UNC path as shown in the commented link. Obviously, change the url value to your path and the other parts. I made this example to show how to copy a...
  3. Kenneth Hobson

    Enable button when cell (of a dropdown) is filled

    Please be more clear about your goal(s). For the file posted in #5, if I did what, what is expected? e.g. 1. IF B2 is changed 2. and IF B2 <> "" 3. Then enable: Rectangle: Rounded Corners 1 4. Else Disable: Rectangle: Rounded Corners 1
  4. Kenneth Hobson

    Macro to create a list

    I don't see how it would error. Maybe you used some data type other than what you posted. e.g. B2 = 1.3 or maybe B5 = -3. Obviously, I did not code for that as it makes no sense. Or, you did not put the macros into a Module. My routine is like a dynamic array without the need to actually select...
  5. Kenneth Hobson

    Macro to create a list

    '=xdupsv(A2:A11) Function xDupsV(fCol As Range, Optional offsetCol As Integer = 1) Dim a, r1 As Range, r2 As Range, c As Range, cc As Range, sNum As Long, i As Long, j As Long Application.Volatile True Set r1 = fCol Set r2 = r1.Offset(, offsetCol) ReDim a(1 To 1) For Each c In...
  6. Kenneth Hobson

    Enable button when cell (of a dropdown) is filled

    I don't know what a dropdown menu is. Do you mean an ActiveX Combobox, Form Combobox, or a data validation cell? Target is normally a range in worksheet events. I do not see where you defined it in your routine. Target.Address might be say "$A$1. As such, your code might be saying...
  7. Kenneth Hobson

    Userform - Listbox update

    Sub refresh_data() Dim r As Range With ThisWorkbook.Sheets("DATA_Parcels") Set r = .Range("K2", .Cells(.Rows.Count, "A").End(xlUp)).Resize(, 7) End With With ListBox1 .Font.Name = Arial .Font.Size = 9 .ColumnHeads = True .ColumnCount = 7 .ColumnWidths =...
  8. Kenneth Hobson

    Userform - Listbox update

    If you don't want the last column, change the number of columns in the listbox. Using the data starting in K1: Sub refresh_data() Dim r As Range, sh As Worksheet Set sh = ThisWorkbook.Sheets("DATA_Parcels") Set r = Worksheets("DATA_Parcels").Range("K1").CurrentRegion With ListBox1...
  9. Kenneth Hobson

    Center Images in Excel column and Resize them

    Here is the 90% of row height for you. Be sure to test on backup copy. Sub Maybe() Dim shp As Shape, tlc As Range For Each shp In ActiveSheet.Shapes Set tlc = shp.TopLeftCell If tlc.Column = 5 Then With shp .Height = 0.9 * tlc.RowHeight .Top = tlc.Top +...
  10. Kenneth Hobson

    Center Images in Excel column and Resize them

    1. Is the 90% for height and width of the cell's size? 2. If you change both height and width uniformly, you could be changing the aspect ratio. That same thing goes for the usual qoal which is to resize to the full cell's height and width. Aspect ratio changes can distort an image.
  11. Kenneth Hobson

    fill color in columns if date range is within specified quarter/year

    I attached the file but for those that don't want to open it: 1. Create a worksheet named Types. 2. In a column, put names of each the type. 3. In column to right of each type, set the fill color. 4. Select the type cells and name the range, Types. 5. Right click the sheets tab, View Code, and...
  12. Kenneth Hobson

    fill color in columns if date range is within specified quarter/year

    I will workup a solution in VBA then. I prefer that myself. While I work on it, think about, is this a one time run to update all or automate it to do the whole row if any of the 3 key cells in that row change values. The latter would probably be my preference. In that way, it would act sort...
  13. Kenneth Hobson

    %20 issue on pdf attachment

    Both of those are paths to your local folders. I can show you how to put the file in a subfolder of the user's MyDocuments or Desktop if you like. If a shared network, a virtual drive is usually used for such things. ThisWorkbook.Path is probably better than ActiveWorkbook.Path to avoid any mixup.
  14. Kenneth Hobson

    fill color in columns if date range is within specified quarter/year

    IF just a few types, conditional formatting formulas could do it. I guess I would use a macro if more than 5 types. If you attached the short example file, we could help more easily. Click the Attach files button below a reply box.
  15. Kenneth Hobson

    %20 issue on pdf attachment

    My guess is that you have some other code that we don't see. Maybe if we saw what ActiveWorkbool.Path resolved to, that would make a difference but I am doubtful. I guess you can try Replace(). e.g. .Attachments.Add Replace(Path_Perf, "%20", " ")
  16. Kenneth Hobson

    %20 issue on pdf attachment

    I can not duplicate that problem. Your 2nd .HTMLBody would cause an error if you Debug > Compile. Substitute function replaces " " with "%20". Was that the intent? Normally, Replace() is used for such. You should not need it though. FWIW, Let is not needed.
  17. Kenneth Hobson

    copy and paste filtered data to another sheet

    I am not sure why Advanced Filter is not used. I am not sure why xlCellTypeVisible was used. Maybe you filtered manually? If you can block color yellow your data to copy and then block color a manual pasted block red in another worksheet, I can see what you expected. Then attach that marked up...
  18. Kenneth Hobson

    copy and paste filtered data to another sheet

    I don't know that the 3 was meant to do. I guess this sort of does what you want? Be sure to test in backup copy for things like this. Dim a, LR As Long With Worksheets("WORKSHEET") LR = .Range("A" & .Rows.Count).End(xlUp).Row a = .Range("A6:G" & LR).SpecialCells(xlCellTypeVisible)...
  19. Kenneth Hobson

    copy and paste filtered data to another sheet

    Untested but I did add the periods for the rows.count as I explained. I also removed the period from .xlUp. I am not sure why compile did not find that error. Sub MoveData() Dim a, LR& With Sheets("WORKSHEET") LR = .Range("A" & .Rows.Count).End(xlUp).Row a = .Range("A6:G" &...
  20. Kenneth Hobson

    copy and paste filtered data to another sheet

    For one thing, your rows.count need the sheet prefix. Since you used With, use: .Rows.Count
  21. Kenneth Hobson

    Document path

    In the future, you would best be served if you posted full Outlook VBA questions to Outlook forums. Many Excel forums also have an Outlook forum and some have an intergrated forum that marries any Microsoft suite of applications to another. Typically, that marriage is Excel and Outlook but can...
  22. Kenneth Hobson

    Document path

    Note that my code in #2 has no space character in MyDocuments. I am not sure why you are doing this in Excel. Seems like Outlook VBA would suffice since there is no Excel interaction. I modified your code to test that it "works". Private Sub Test1_SaveAttachments() SaveAttachments "Price...
  23. Kenneth Hobson

    Document path

    You need a trailing backslash character. e.g. MsgBox CreateObject("WScript.Shell").SpecialFolders("MyDocuments") & "\" Your function does not return a result so it should be a Sub.
  24. Kenneth Hobson

    Modify the code for sending different emails to Multiple E-Mails

    Yes, that is the problem that I told you about in #11. Below is method (2). There is an issue in selecting the range with data due to your formulas. The usual CurrentRegion, UsedRange, and End methods will not suffice. I can write code to find last row in column A with data. For now, see if...
  25. Kenneth Hobson

    Modify the code for sending different emails to Multiple E-Mails

    Why impossible? I said a macro can do it. Recording a macro can help you learn some syntax. Or, in the first With: With WKS .UsedRange.EntireColumn.AutoFit 'and other code.... End With
Back
Top