byval

  1. skowi

    Overriding the regional settings (commas vs semicolons in formulas)

    Hello, This is my first post here. So far, I've been ending up on this forum always to find the solution (and I'm really grateful for that!). However this time I have a more difficult task to complete. I need to distribute one macro'ed spreadsheet which will be used to generate list of roles...
  2. J

    Convert Sheet Events to Macro's

    Hi all, i have the below example of code that detects when BACK_COM is in cell T5 of Sheet1. When ba.placeBet is initiated, the program "Betting Assistant" will automatically call ba_betPlaced. What i am looking to do is rather than have the initial ba.placeBet triggered on Workseet_Change, i...
  3. B

    How to updated statement with PtrSafe keyword

    Hi, I have posted a generic query regarding ‘PtrSafekeyword’ few days ago. However not able to find my post hence posting as new thread. I have below line of code in my macro and am required to update it with ‘PtrSafe keyword’ Private Declare Function GetPrivateProfileStringLib "kernel32"...
  4. O

    64 bit issue

    Hi I'm working in 32 bit Excel but I'm getting error in Excel which is 64 bit. How do I edit the codes in 64 bits. Public db As DAO.Database Public rs As DAO.Recordset Public sql As String Declare Function sndPlaySound32 Lib "winmm.dll" Alias _ "sndPlaySoundA" (ByVal lpszSoundName As String, _...
  5. S

    Help to modify code Worksheet_Change(ByVal Target As Range) to ByVal Target As Object

    Hello, I have this code that filters data by the selection in cell 8 (data variation). Can I please have your help to modify ByVal Target As Range to ByVal Target As Object so it filters by the selection made in combobox1? Private Sub Worksheet_Change(ByVal Target As Range) If Target.Address...
  6. A

    Stop picture flashing as resized.

    I didn't write this and can't remember where it came from. Consists of a Form and a class module. An image file is loaded via the Forms Picture property, and a "handle" on the Form lets you drag the picture to any size. It's brilliant. Except as you drag the picture it flashes and looks awful...
  7. C

    Userform to display in task bar

    I know i am kind of beating a dead horse around the internet with this, but i used to be operating on windows 7 and my code functioned for showing a taskbar icon for the userform when the application window was hidden, but when i upgraded to windows 10, the code stopped working. is there...
  8. J

    Modified Rank function?

    I have worked out a UDF which replicates Excel Rank() function. Now, I am trying to modify it such that instead of outputting 1 2 2 4 as the ranks for a set {2,5,5,8} it should output 1 3 3 4; and it should be able to handle any data as per the modified logic. Public Function Rnk( _...
  9. S

    MouseMove Event : When mouse is outside the edge or border of command button would like to change the background colour of commandbutton

    Hello How is above statement in RED justified with below code as i am stuck and color does not change when the mouse is outside the border or edge of command button Private Sub CommandButton1_MouseMove(ByVal Button As Integer, ByVal Shift As Integer, ByVal x As Single, ByVal y As Single)...
  10. spencer_time

    Trying to understand ByRef and ByVal

    Hello again guys, I'm still trying to learn VBA and excel macros as best and fast as I can and one of the ways I have been doing that is posting my problems for you guys to help me with AND looking at others posts and attempting to help them with their problems. I was trying to help someone and...
  11. 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...
  12. C

    64 Bit 2016 Right Click Context Menu (User Form)

    Hello: I am currently using Excel 2016 (64 Bit). I opened a workbook that is a few years old with a user form that used to have a context menu upon right clicking fields. I am no longer able to show the context menu with the below error: "Compile error: The code in this project must be...
  13. S

    getting columns to play sound when data is entered

    Hello, I am trying to get excel to play a sound when data is entered, we scan into a database and sometimes the data does not go through correctly and need some way to notify the user that the data has been entered into the cell so that they may continue scanning. However I am running into an...
  14. T

    UDP listen does not read (TCP works fine)

    Hi UDP listen does not work, anyone can se what I am doing wrong ? (I have googled around but failed anyhow :-) ) I have copied most of the code below from internet, it worked with TCP, the only thing I have changed for the UDP listen case is that I replaced the two lines of the TCP part with...
  15. T

    Compile Error after upgrading form Office 32bit to Office 64bit

    Okay here is the issue. Where I work we updating Oracle SmartView to 64bit but before we do that we have to uninstall MS Office 32 bit and install office 64 bit. I did that and now when he opens the spreadsheet he gets the following message "though Compile error: The code in this project...
  16. N

    VBA Excel UserForm Maximize Minimized Size Drag Control

    Hello, I got the following code to maximize, minimize and resize the form, but it didn't work well, every time I ran it, I got a popup msg "Sub or Function not defined" and highlight "GetWindowLong" Note: I have 64bit system, so I added "PtrSafe" to the "Private Declare Function" but keep...
  17. U

    Macro stops at this line: Public Declare Function apiShowWindow Lib "user32"

    My hard drive crashed and now my macros will not work. I believe I need to go to Tools and References but what do I need to add for this line? Public Declare Function apiShowWindow Lib "user32" Alias "ShowWindow" (ByVal hwnd As Long, ByVal nCmdShow As Long) As Long I am running Windows 10 64...
  18. C

    Excel 2016 VBA ... 1.)Compiler Error: Type Mismatch? and/or 2.) Code Must be Updated For Use On 64-bit Systems?

    Intro: the program below refers to a userform program that pops up with empty fields to be filled 5x left and 5x right then u can 1. save it and it fills an excel tab (e.g.: client database-tab) 2. delete details (deletes userform - user starts filling it again)...
  19. M

    Power Point VBA code

    Hi all, I am working on a presentation & I want to show a number that decreases (like a counter) & after looking on some YouTube videos I think it could be achieved much easier with the VBA loop. However, I am having an issue with the below code where it will start with 10 (in presentation...
  20. countryfan_nt

    Compile Error: compile error constant expression required.

    Hello friends, Hope all is well! Please help me with the bug below. the code converts Arabic numbers to text. When I apply the code I get: Compile Error: compile error constant expression required. The highlight is on: .Value of the line: Private Const MyBegTx As String =...

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