Tutorial by Examples: book

Option Explicit Sub LoopAllSheets() Dim sht As Excel.Worksheet ' declare an array of type String without committing to maximum number of members Dim sht_Name() As String Dim i As Integer ' get the number of worksheets in Active Workbook , and put it as the maximum number of members in t...
ansible-playbook -i path/to/static-inventory-file -l myhost myplaybook.yml
ansible-playbook -i path/to/dynamic-inventory-script.py -l myhost myplaybook.yml See dynamic inventory for more details.
In many Excel applications, the VBA code takes actions directed at the workbook in which it's contained. You save that workbook with a ".xlsm" extension and the VBA macros only focus on the worksheets and data within. However, there are often times when you need to combine or merge data fr...
It's a VBA Best Practice to always specify which workbook your VBA code refers. If this specification is omitted, then VBA assumes the code is directed at the currently active workbook (ActiveWorkbook). '--- the currently active workbook (and worksheet) is implied Range("A1").value = 3.1...
If you want to access a workbook that's already open, then getting the assignment from the Workbooks collection is straightforward: dim myWB as Workbook Set myWB = Workbooks("UsuallyFullPathnameOfWorkbook.xlsx") If you want to create a new workbook, then use the Workbooks collection o...
Often saving new data in an existing workbook using VBA will cause a pop-up question noting that the file already exists. To prevent this pop-up question, you have to suppress these types of alerts. Application.DisplayAlerts = False 'disable user prompt to overwrite file myWB.SaveAs FileNa...
The "factory default" number of worksheets created in a new Excel workbook is generally set to three. Your VBA code can explicitly set the number of worksheets in a new workbook. '--- save the current Excel global setting With Application Dim oldSheetsCount As Integer oldSheets...
Step 1: Install the SDK You can install the SDK manually or via CocoaPods. The latter option is highly recommended. Put these lines in Podfile: target 'MyApp' do use_frameworks! pod 'FBSDKCoreKit' pod 'FBSDKLoginKit' pod 'FBSDKShareKit' end Run pod install in the terminal and op...
Sometimes we want to design our own UI for "Sign In With Facebook" button instead of the original button that comes with FacebookSDK. In your storyboard, drag your UIButton and set it however you want it to be. Ctrl + drag your button to your view controller as IBAction. Inside the IB...
After the user signed in to Facebook at your app, now it's time to fetch the data you requested at the FBButton.readPermissions. Swift: enum FacebookParametesField : String { case FIELDS_KEY = "fields" case FIELDS_VALUE = "id, email, picture, first_name, last_name" ...
When working with multiple open Workbooks, each of which may have multiple Sheets, it’s safest to define and set reference to all Workbooks and Sheets. Don't rely on ActiveWorkbook or ActiveSheet as they might be changed by the user. The following code example demonstrates how to copy a range from...
The format of a playbook is quite straightforward, but strict in terms of spacing and layout. A playbook consists of plays. A play is a combination of targets hosts and the tasks we want to apply on these hosts, so a drawing of a playbook is this: To execute this playbook, we simply run: ansible...
#Modules to use use Cwd 'abs_path'; use Win32::OLE; use Win32::OLE qw(in with); use Win32::OLE::Const "Microsoft Excel"; $Win32::OLE::Warn = 3; #Need to use absolute path for Excel files my $excel_file = abs_path("$Excel_path") or die "Error: the file $Excel_path ha...
ActiveWorkbook and ThisWorkbook sometimes get used interchangeably by new users of VBA without fully understanding which each object relates to, this can cause undesired behaviour at run-time. Both of these objects belong to the Application Object The ActiveWorkbook object refers to the workbook ...
Add below dependencies to your build.gradle // Facebook login compile 'com.facebook.android:facebook-android-sdk:4.21.1' Add below helper class to your utility package: /** * Created by Andy * An utility for Facebook */ public class FacebookSignInHelper { private static final...
If you want to retrieve the details of a user's Facebook profile, you need to set permissions for the same: loginButton = (LoginButton)findViewById(R.id.login_button); loginButton.setReadPermissions(Arrays.asList("email", "user_about_me")); You can keep adding more permiss...
Once you first add the Facebook login/signup, the button looks something like: Most of the times, it doesn't match with the design-specs of your app. And here's how you can customize it: <FrameLayout android:layout_below="@+id/no_network_bar" android:id="@+id/FrameLay...
You have to setup the prerequisites. Add the Facebook activity to the AndroidManifest.xml file: <activity android:name="com.facebook.FacebookActivity" android:configChanges= "keyboard|keyboardHidden|screenLayout|screenSize|orientation" android:theme=&...
Facebook SDK 4.0 onwards, this is how we logout: com.facebook.login.LoginManager.getInstance().logOut(); For versions before 4.0, the logging out is gone by explicitly clearing the access token: Session session = Session.getActiveSession(); session.closeAndClearTokenInformation();

Page 1 of 2