byval

  1. M

    Excel crashing during VBA procedures

    I have a module called UpdateCheck with procedures which check another document to see if the version number has changed. If it has, it asks the user if they want to update the document to the new version. This is only to update the modules because the formatting of the worksheets is set in...
  2. T

    VBA to close WIndows Explorer

    According to this thread: https://www.mrexcel.com/forum/excel-questions/1048556-vba-close-windows-explorer-window.html this code closes a session of Windows Explorer: Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As Any, ByVal lpWindowName...
  3. S

    Compile error when attempt to run macro with #If VBA7 = True Then...

    Hello Excel gurus, I am new to this forum, this is my first posting, so my apologies in advance if I miss a posting rule... Doing Excel VBA engineering automation just for fun, I am not a professional programmer. Have a small code that calls a DOS program (spice.exe) through the Shell. It...
  4. Jaafar Tribak

    Cool Customized standard InputBox to allow validating input as you type in.

    Hi all, Workbook Demo. As the tilte says, this is just a standard vba inputbox that I have customized with the use of the Windows API in order to validate user input dynamically as you type-in as well as masking the input with a password character (*) if required. Another cool functionality I...
  5. A

    Excel VBA passing a Handle as a variable to an API function (Special Folders)

    Can anyone help me in passing handle values to a function as a variable. This is to get the paths of all the special folders. The undernoted code works perfectly well: Private Declare Function GetFolderPath Lib "shfolder.dll" _ Alias "SHGetFolderPathA" _ (ByVal hwndOwner As Long, _...
  6. Weeble

    VBA runtimerror 5, from LEFT(Activeprinter function help.

    I found a code that could solve alot of my problems, but I get 'Run time Error 5 , Invalid procedure or Argument. Anyone that could help me out with the issue? Code is used for when printing lots of sheets, some papers are missing / skipps. This code is suppost to hold VBA until the sheet has...
  7. R

    Titleless UserForm: Code in wrong(?) Modules...

    Hi Folks, I've been trying to adapt some code from a VBA book, but I can't seem to get it right (most likely because it's all Ελληνικά to me... :oops: ). The code is for a title-less UserForm. Examples are abundant on the Web, but I haven't (yet) found one that does what I'd like to do, the...
  8. S

    Downloading Files through VBA

    I'm borrowing these two code from another user on here. I'm trying to download some smaller files (not overly big) via a very slow to slow satellite connection (wx dependent). The first code (FileAPI) through a "Download File Process Failed" and the second code broke at "WinHttpReq.send"...
  9. A

    UserForm Resize

    I found the following with pretty much does what is wanted - 'Written: February 14, 2011 'Author: Leith Ross ' 'NOTE: This code should be executed within the UserForm_Activate() event. Private Declare Function GetForegroundWindow Lib "User32.dll" () As Long Private Declare Function...
  10. L

    VBA - call function within With..End With

    Hi, I have written something like Sub Workbook_SheetChange(ByVal Sh As Object, ByVal Target As Range) Dim ChangedRow As Integer With Sh If Not Intersect(Target, .Columns(3)) Is Nothing Then On Error GoTo bm_Safe_Exit Application.EnableEvents =...
  11. M

    Stop .wav file with button after started playing

    So currently I am using this soundme code to play a .wav file #If Win64 Then Private Declare PtrSafe Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName As String, _ ByVal hModule As LongPtr, ByVal dwFlags As Long) As Boolean #Else Private Declare...
  12. M

    Stop .wav file with button after started playing

    Just had a question that I googled and searched this forum and every where else but could not find a solution anywhere. So I am using this code to help me play a .wav file #If Win64 Then Private Declare PtrSafe Function PlaySound Lib "winmm.dll" _ Alias "PlaySoundA" (ByVal lpszName...
  13. J

    Print Email from sender

    Hi, i am using outlook office 365 now and i have a rule and vba script that in 2007 worked fine but now even though i put as default Internet explorer as PDF reader keep asking every time that a new email comes that i have a rule for which program to use open the PDF and I have to print it...
  14. K

    how can I get this code to work on excel where its on a 64bit machine?

    When it crashes the error is highlighted on this line: Me.Caption = VBA.UCase$(Format$(VBA.Date, "yyyy - mmmm ")) & VBA.Day(VBA.Date) _ & " (" & VBA.Date & ")" I changed the declaration from this: Private Declare Function GetKeyState Lib "user32" (ByVal...
  15. Jaafar Tribak

    Highlighting the cell under the mouse pointer ( GDI based )

    I wrote some code in the past that enables the user to highlight the cell currently under the mouse pointer ... See a code example here : https://www.mrexcel.com/forum/excel-questions/1090283-hover-over-vs-selecting-cell-post5240255.html#post5240255 The code in the link works fine except that...
  16. Jaafar Tribak

    Can anyone test this code for me (IAccessibility)

    Hi all, Not sure if this is the right section of the forum to ask this question but I am trying to get the accessibility names of the workbook scrollbars and tabs .. The AccName function returns a string that is language dependent so when I run the code on my machine, I get the AccName in...
  17. K

    Excel VBA How To Make An API To Run On Both 32-bit and 64-bit

    Hi, I am using below API in Excel 32-bit and it was running fine until then the use has 32-bit, but now the problem is that some user is running 32-bit and some 64-bit, and below API works only on 32-bit. 'Data Processing Workflow Tool version 1.1_New API Private Declare Function...
  18. Nelson78

    Surfing the web via Excel: dealing with site modal window

    Hello everybody. I'm in troubles while surfing a web site: the deadlock is the modal window you can see in the image. https://imgur.com/a/iq4KSDY It absolutely blocks every Excel actions: I've to manually click "OK" in order to unblock the process. I've tried the following solution, but...
  19. B

    Windows API for taskbar icon change for multiple monitors

    Hi, I have the following code to update the icon in the taskbar for my userform below. It was great however, we have dual monitor setups and the primary monitor will show the correct icon in the task bar but all additional monitors have the usual excel icon. How can I switch all monitor taskbar...
  20. O

    Retrieve date from MsgBox to TextBox in other Form

    Hello, I got stuck on the following code that shows date selected from datepicker Private Sub select_label(msForm_C As MSForms.Control) '/* Capture the selected date */ Dim i As Integer, sel_date As Date i = Split(msForm_C.Name, "_")(1) - 1 sel_date = FirstCalSun(curMonth) + i...

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