vbnullstring

  1. P

    Track changes on a Worksheet in Excel with VBA

    I am currently using the following: Private Sub Worksheet_Change(ByVal Target As Range) If Not Intersect(Target, Range("O:T")) Is Nothing Or Range("W2") = vbNullString Then GoTo Skip If Range("W2") <= Range("W1") Then If Not Intersect(Target, Range("A:U")) Is Nothing Then Call...
  2. keiserj

    <> vbNullString Then

    Having to trouble getting this code to work. Used all last year and now always running debug and I'm struggling to figure out why? Private Sub CommandButton1_Click()Dim ws As Worksheet Dim shtname As String Dim codes As String If Workbook.TextBox1.Text <> vbNullString Then MsgBox "Need...
  3. D

    ensuring only numbers are entered

    Hi. This is what I got, it works like I want it except for when it's to enter retail price and contractor pricing. what I would want it to do is make sure whoever enters the item and price that they enter it properly... and numbers only... so if they were to enter an item with the $ sign or...
  4. T

    Data Validation

    This code creates a data validation list for the cell A1: Dim i, j For j = 1 To 10 i = i & "," & j Next j With Sheet1.Range("A1") With .Validation .Delete .Add Type:=xlValidateList, _...
  5. P

    Setting print layout for pdf using vba

    Hi guys, I do hope you guys are able to help in as I would like to set printing layout for pdf before printing them. I would like my setting to print all, multiple with 2 sheets per page,page order horizontal, print on both side with flipping on long edge and lastly orientation is landscape...
  6. H

    New Userform

    Dear All, Could you please help me to create new Userform and including combobox which I can filter and select material name (material names need to be took from any excel sheet) and when I click ok then this need to be saved "account" sheet (each time need insert new row). Textbox1 will be...
  7. H

    Help VBA command

    Dear All, I have created new USERFORM1 and added comboBox which there multiple selection types. Please see below code: Private Sub ComboBox1_Change() With ComboBox1 End With End Sub Private Sub CommandButton1_Click() If ComboBox1 = vbNullString Or TextBox1 = vbNullString Or...
  8. C

    VBA - Clear "cells that look blank but AREN'T actually blank"

    Hi All - I have a macro coded below that looks in Column A and will essentially clear cells that look blank but aren't actually blanks. It does work, however it is very slow and I don't think I can make it client-facing in its current state. Is there a way to make it run faster and/or prettier...
  9. C

    Code Cleanup - Multiple If-Thens

    This is probably a really basic question, but what is the most efficient way to restructure this code to eliminate all of the if-thens? I'm thinking "With" but it did not work when I tried. This is part of a dynamic userform that automatically calculates required cycle times based on...
  10. T

    Select Case syntax

    What is the difference between this: Select Case MyCondition Case vbNullstring Case Else End Select and this: Select Case MyCondition Case Is = vbNullstring Case Else End Select I seem to remember there IS a difference, if you were testing for a value or...
  11. G

    TextBox Only Numbers VBA

    Hi All, I currently use this code to only allow users to type numbers into the text box on my userform, I need some help with how I can modify this so the users are also blocked from putting zeros at the beginning of there data? Private Sub OnlyNumbers() If TypeName(Me.ActiveControl) =...
  12. D

    If first cell has a value in it, how can my formula below know this and skip to next available cell?

    Hi Everyone, been posting today a few things... have a few different ways now that I want to do this.. but I think if I can find a way to do this... it will help me out a lot... Below is my formula. What I need help with is if someone can tell me how I can change it if possible that is... so...
  13. G

    User Form Addition

    Hello All Private Sub Btn_Find_Budget_Click() On Error GoTo Error_Handler If (Tbx_REV = vbNullString) Or (Tbx_Actual = vbNullString) Then MsgBox ("To Compute Budget:" _ & vbNewLine & "REV & Actual fields require an input") Exit Sub End If Tbx_Budget = (Tbx_REV + Tbx_Actual)...
  14. B

    Using wildcards for fso.getextensionname comparison

    Hi, I have a function that opens files and does not have much problem except it cannot seem to open excel files while my modeless userform is open. If my userform is not open then for some reason it works. So to get around this I want to use wildcards to catch any type of excel file extension...
  15. S

    Parameter has to be NULL

    I have some stored procedures which I am not able to see. I know that some parameters have to be NULL. But I don't know what it means if a parameter in a stored procedure "the_function(x, y, z)" has to be NULL. Should it be written as NULL or just an empty string; the_function(NULL) or...

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