Lesson#124: How to format text in excel with VBA

Another step towards learning VBA. In this post we will learn to format text in excel with VBA. In the previous post I discussed about changing cell background color and about color codes. So we will start in a little advance mode here. I am here taken an example of cell A1. I am going…

Lesson#123: How to change cell color with VBA

Here I will show how to change cell color by using VBA. These are the basic lessons for learning VBA. There are some methods to write a code to change cell background color. Here I have picked a cell range A1:A10 as an example. Now press Alt+F11 to go to VBA editor and click on…

Lesson#122: Cell formatting in a protected sheet

Excel doesn’t accept to format cells which are protected, if they aren’t allowed for users. To format unprotected or protected cells users must allow before protecting a sheet. When you are protecting a sheet just see these options. The third option is Format Cells and when you select this you will be able to format both protected…

Lesson#121: How to make some cells unprotected when protecting a sheet

OK, I am having a sheet here which calculate the age when birth date is provided. I need to protect the sheet before giving it to users. So none of them change the structure or formula. But I also need to┬ámake some cells unprotected to make the user enter necessary data. I have colored those…

Lesson#120: What is Input Box in VBA?

What is Input Box? In VBA Input Box is a function that allows you to request information from the user who can type it in a text field of a dialog box. The basic syntax of this function is: InputBox(prompt[, title] [, default] [, xpos] [, ypos] [, helpfile, context]) As String First example showing…

Lesson#119: What is Message Box in VBA?

What is Message Box? A message box is a special dialog box used to display a piece of information to the user. The user cannot type anything in the message box. There are usually two kinds of message boxes you will create: one that simply displays information and one that expects the user to make…

Copyright 2017-2018@Excelabcd