string

  1. J

    Problem handling a run-time 91

    '/////////////////////////////Variable Declaration////////////////////////////////////////////////// Dim masterData As Worksheet, console As Worksheet, inputCell As Range, firstNames As Range, lastName As Range, countWhichName As Range 'EZ refs for sheets/ranges Dim client As String...
  2. J

    VBA User Selected Range Error on Cancel

    I have been using this bit of code to get a user selected column (uses worksheet and string inputs). HOwever, if the user selects cancel, it errors out. Interestingly, it was working until I declared all my variable types. Any idea how to work around the error? Thanks, Justin Private...
  3. L

    Accessing a shared inbox from outlook to VBA

    Hello, I have written some code that retrieves the number of mails from two inboxes. I've tested it locally however when I am trying to connect to a Shared Inbox, it returns a 0. I am very confused and I am wondering if someone can help me. The names of the two shared inboxes are 1) FolderA and...
  4. L

    workbooks.open

    Hi The first code, I used workbooks.open without () and excel did give me error message. In the second code, I had to use () otherwise I will get error message. Why is that? Thank you so much. Sub wb_open_using_collection() Dim x As String x = InputBox("enter file name with path")...
  5. F

    VBA line to automatically click ENTER in script

    I have a code that converts documents to PDF format. They are from a mail merge from an excel sheet. When you open the word documents it gives a pop up box and I need it to automatically click ENTER so it will continue. My code is below if anybody has any suggestions Sub ConvertWordsToPdfs()...
  6. Y

    Save Copy File as Read Only (VBA)

    Hi dear, I am still learning about vba. I have a code to create copy/duplicate file to other directory, like this: Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean) Dim wb As Workbook: Set wb = ThisWorkbook Dim FSO As Object Dim strTargetPath As String...
  7. Y

    Convert variable length txt field to Z x 1 digit numbers

    Where Z=length of string. Z can be 0 to 8. Each byte of the string will be a number between 0 and 9. I couldn't use a numeric field because 00100 becomes 100 and 00000001 becomes 1. The text string must have 1 byte for each time slot. I referee basketball. There are between 0 and 8 games in a...
  8. V

    Attachment Download

    I have the below code and have it is on Outlook VBA on ThisOutlookSession But I am still not able to download the attachments in the folder, I am trying this for quite a while now but no luck, did google as well. It is not showing any error, but still not downloading the attachment in the...
  9. J

    Runtime Error 13: Type-Mismatch

    Hi, I have a code from Stackexchange, which is giving a runtime error 13 with 2 of the 3 supporting examples. And, I have not been able to decode why. Sub Example 3 executes but Sub Example 1 and Sub Example 2 fail. Need help in getting it rectified. Function MultiSplitX(ByVal SourceText As...
  10. D

    Copy & Paste Cell formats

    i keep wrestling with the copy and past between workbooks/worksheets. The code below prompts for a range date then selects data from a worksheet based on the date entered and successfully creates a new workbook and copies the correct data. However the new sheet isnt formatted the same. This is...
  11. L

    Breaking split at not 0

    Hello guys, I have a sequence: <colgroup><col></colgroup><tbody> 00000001 00000005 00000009 00000013 00000017 00000021 </tbody> I want to extend it indefinitely, well until it fits, but i was not sure what the best approach would be. I was thinking of taking it as a string...
  12. G

    User Forms and Global Variable

    The below is my code. When ufmAccount is shown, it no longer recognizes wsA. It returns a runtime error 91. Why is this? I thought a public variable can be used throughout. Thank you in advance. Public wsA As Worksheet, wbA As WorkbookSub NewExpense() Dim sExpDesc As String, sReplace As...
  13. L

    More =IF formula issues

    A simple =IF statement checks a value in a cell on a different worksheet for TRUE/FALSE and performs the string paste accordingly. I have removed the "" from around the boolean TRUE/FALSE. The boolean values are copy/paste value from another workbook. Some formulas will update, many will not...
  14. rdrjr

    Reverse Hex Byte Pairs

    Okay this is what I am trying to do. I need to take a Hex value and have it returned in reverse Byte pairs as in the following diagram For instance the top line (480000074B26E42D) being the original hex value, then reversing it so that the outcome = 2D E4 26 48 07 00 00 48 I have tried using...
  15. B

    Problem with getfolder

    Hi, I am trying to store the files by using getfolder but even there are 6 different types of files my object only store four of them. The only thing I can notice as difference is that the files that are ignored have very long file name. As you may see in the link below, count is indicates...
  16. Q

    update multiple excel links

    this may be a bit of an overlap of MS Excel with MS powerpoint. I need to update multiple links on a powerpoint from 2 excel files. there are individual links displayed to each object, chart, graph in the edit links pop up. Is there a way i could update them all at once without having to...
  17. J

    VBA to refresh power query then resume macro once the refresh is done

    Hi All, I've searched the internet and found a few threads on this topic. I've tried some of the concepts and have been having issues. I hope this is a simple fix that I'm just missing. I'm receiving a Run-time error '1004': Application-defined or object-defined error. But I feel like...
  18. W

    VBA to fill array with delimited data from text file

    I'm trying to use VBA to extract data from a series of text files. So far I've found the code below at The VBA Guide To Interacting With Text (.Txt) Files — The Spreadsheet Guru Sub DelimitedTextFileToArray() 'PURPOSE: Load an Array variable with data from a delimited text file 'SOURCE...
  19. kelly mort

    VBA - get active printer status

    Private Declare Function GetPrinterApi Lib "winspool.drv" Alias _ "GetPrinterA" (ByVal hPrinter As Long, _ ByVal Level As Long, _ buffer As Long, _ ByVal pbSize As Long, _ pbSizeNeeded As Long) As Long Private Type PRINTER_DEFAULTS pDatatype As...
  20. G

    How to erase parts of a string of text

    Hi, I have thousands of strings of text like this one in an excel sheet (Pembina Pipeline Corp. 3.54% 02-03-2025 Callable MTN) and what I would like to do is to build a formula that goes through those strings and remove all text to the right of the year in those strings. All strings have 3...

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top