• This is default featured slide 1 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 2 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 3 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 4 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

  • This is default featured slide 5 title

    Go to Blogger edit html and find these sentences.Now replace these sentences with your own descriptions.This theme is Bloggerized by Lasantha Bandara - Premiumbloggertemplates.com.

Excel Macro : Excel VBA code to Print the Sheet

Hope you are doing well !! Thought of sharing a small VBA code to help you writing a code to print the Workbook, Worksheet, Cell Range, Chart etc. .PrintOut () Method is used to print any Excel Object.

Syntax of .PrintOut Method

YourObj.PrintOut(From, To, Copies, Preview, ActivePrinter, PrintToFile, Collate, PrToFileName, IgnorePrintAreas)

Where:

  • YourObj (Required): It is a variable which represents your Object which you want to print. For example: Workbook, Worksheet, Chart etc.
  • From (Optional): Starting page number from which printing has to start. If this argument is omitted, printing starts from page 1.
  • To (Optional): End page number till which printing has to be done. If omitted, printing will be done till the last page.
  • Copies (Optional): This is the number of copies to be printed. If omitted, only one copy will be printed.
  • Preview (Optional): If passed as TRUE then Excel will invoke the print preview before printing the Object. If omitted, FALSE will be passed and hence excel will invoke the printing directly without showing the preview.
  • ActivePrinter (Optional): This sets the name of the active printer
  • PrintToFile (Optional): True is passed to print to a file. If it is not specified then user is prompt to enter an output file.
  • Collate (Optional): This is a Boolean type argument. TRUE is to collate multiple copies.
  • PrToFileName (Optional): If the above parameter PrintToFile is set to TRUE then you need to specify the name of the file you want to print to
  • IgnorePrintAreas (Optional): This is a Boolean type argument. If this argument is set to true then this function print the entire object.

Examples:

Based on above explanation and Syntax we will see examples of printing the Workbook, sheets, charts etc.

Example 1: VBA Statements to Print Objects with Default Options

1. VBA code to print ActiveWorkbook
  1. Function PrintActiveWorkbook()  
  2.       ActiveWorkbook.PrintOut  
  3. End Function  
2. VBA code to print Active Sheet
  1. Function PrintActiveSheet()  
  2.       ActiveSheet.PrintOut  
  3. End Function  
3. VBA code to print all WorkSheets
  1. Function PrintAllWorkSheets()  
  2.       WorkSheets.PrintOut  
  3. End Function  
4. VBA code to print a Single Sheet
  1. Function PrintOneSheet()  
  2.       Sheets("Sheet1").PrintOut 'Sheet1 is the name of the Sheet which you want to Print  
  3. End Function  
5. VBA code to print more than one Sheet
  1. Function PrintMultipleSheets()  
  2.       Sheets(Array("Sheet1" , "Sheet2""Sheet3").PrintOut   
  3. End Function  
6. VBA code to print Selected area of a Sheet
  1. Function PrintSelectedArea()  
  2.       Selection.PrintOut   
  3. End Function  
7. VBA code to print Range of Worksheet
  1. Function PrintRange()  
  2.       Range("A1:D5").PrintOut   
  3. End Function  
8. VBA code to print Excel Chart
  1. Function PrintChart()  
  2.       Sheets("Sheet1").ChartObjects("Chart1").Chart.PrintOut 'Chart1 is name of the Chart  
  3. End Function  
9. VBA code to print All Charts in a WorkSheet
  1. Function PrintAllChart()  
  2. Dim ExcelCharts As Object  
  3. Set ExcelCharts = Sheets("Sheet1").ChartObjects  
  4. For Each Chart In ExcelCharts  
  5.     Chart.Chart.PrintOut  
  6. Next  
  7. End Function  
10. VBA code to print All Charts in a Workbook
  1. Function PrintAllChart()  
  2.     Dim ExcelCharts As Object  
  3.     For Each Sheet In Sheets  
  4.         Set ExcelCharts = Sheet.ChartObjects  
  5.         For Each Chart In ExcelCharts  
  6.             Chart.Chart.PrintOut  
  7.         Next  
  8.         Set ExcelCharts = Nothing  
  9.     Next  
  10. End Function  

Example 2: VBA Statements to Print Objects with different parameters passed

1. VBA code to print From Page Number X to Page Number Y
  1. 'Below statement will print from Page No:2 to Page No:3  
  2. Worksheets("Sheet1").PrintOut From:=2, To:=3  
2. VBA code to print more than 1 Copy
  1. 'Below statement will print 3 copy of the Sheet1 from Page 2 to Page no: 3  
  2. Worksheets("Sheet1").PrintOut From:=2, To:=3, Copies:=3  
3. VBA code to Show Print Preview before actual printing
  1. 'Below statement will print 3 copy of the Sheet1 from Page 2 to Page no: 3  
  2. Worksheets("Sheet1").PrintOut From:=2, To:=3, Copies:=3, Preview:=True  
Share:

এক ক্লিকে Windows 10 এর সব Settings আপনার হাতের মুঠোয়|

আমি আপনাদের থেকে বয়সে অনেক ছোট হব, সুতরাং আমার সকল ভুল ক্ষমার সুন্দর দৃষ্টিতে দেখবেন।আর যারা এটা আগে থেকেই জানেন তারা আমাকে উৎসাহ দিতে ভুলবেন না।
তো আজ আমি আপনাদের দেখাবো,  Windows-10 এর সকল Settings সুমহ কিভাবে Shortcut Accessকরা যায়।
এ কাজটা খুবই সহজ,  চলুন এবার দেখা যাক।
প্রথমে আপনাকে যা করতে হবে  Desktop বা যেকোন  স্থানে নতুন একটা Folder নিতে হবে।
Mouse এর Right Button এ Click>Cursor  টি New এর  New folder  টিএর ঘরে নিয়ে Mouse এ
Left Button  click করুন। নীচের ছবির মত করে….
Image 1
এবার  New folder কে GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
নামে  Rename করুন।
Image 2
এবার Folder টি Control Panel এর আইকন ধারন করবে। এবার এটিতে Double Click করুন।
image 3
image4
এরপর সব Settings একবারে আপনার হাতের মুঠোয়। ব্যাস শুরু করে দিন আপনার মনের মত করে আপনার PC কে সাজানো।
তো আজ এই পর্যন্তই|আগামী টিউনে আবার দেখা হবে। ধন্যবাদ সবাইকে।


Repeated cause of 200 words rule :
তো আজ আমি আপনাদের দেখাবো,  Windows-10 এর সকল Settings সুমহ কিভাবে Shortcut Accessকরা যায়।
এ কাজটা খুবই সহজ,  চলুন এবার দেখা যাক।
প্রথমে আপনাকে যা করতে হবে  Desktop বা যেকোন  স্থানে নতুন একটা Folder নিতে হবে।
Mouse এর Right Button এ Click>Cursor  টি New এর  New folder  টিএর ঘরে নিয়ে Mouse এ
Left Button  click করুন।
এবার  New folder কে GodMode.{ED7BA470-8E54-465E-825C-99712043E01C}
নামে  Rename করুন।

এবার Folder টি Control Panel এর আইকন ধারন করবে। এবার এটিতে Double Click করুন।

এরপর সব Settings একবারে আপনার হাতের মুঠোয়। ব্যাস শুরু করে দিন আপনার মনের মত করে আপনার PC কে সাজানো।
Share:

Convert WIM to ESD- Compress WIM File & Reduce Windows 7,8,8.1,10 Size

Windows Vista/7 বা পরবর্তী Windows এ Install.wim ফাইলটি খুবই গুরুত্বপূর্ণ। এ ফাইলটিতে Windows এর সমস্ত File/Folder থাকে। যাঁরা Windows Vista/7 বা পরবর্তী Version এর Windows Customize করতে চায় তাঁরা এ ফাইলটিকে Edit করেন। তাছাড়া একাধিক Install.wim File Merge করার জন্যও এটি Edit করা হয়। এসব কাজ করতে গিয়ে Install.wim File টির সাইজ বেড়ে যায় যা কখনো কখনো সমস্যার সৃষ্টি করে। তাইInstall.wim File টির সাইজ কমানো জরুরী হয়ে পড়ে। Install.wim File টিকে Install.esd তে Convert করে এ সাইজ কমানো যায় অনেক। এ টিউটোরিয়ালটিতে ঐ কাজটিই আমরা করবো।

Install.wim to Install.esd:
Install.wim File টি Source Folder এ থাকে। Source Folder এ Boot.wim নামে আরেকটি ফাইল থাকে যাWindows এর পুরো Installation Process সম্পন্ন করে। ঐ ফাইলটি কোনভাবে Edit করা যাবে না। File টিModify করতে গেলে Setup Process এ Error দেখা দিতে পারে। তাই আমরা Install.wim ফাইলটি নিয়ে কাজ করবো। Install.wim File টিকে Modify করার জন্য NTLiteWim Editing Tool ব্যবহার করা যায়। একটিInstall.wim ফাইলে এক বা একাধিক Image থাকতে পারে। এক একটা Image Windows এর এক একটিVersion হিসেবে কাজ করে। যেমন আমরা Setup এর সময় Version গুলোর একটি লিস্ট দেখতে পাই যেখান থেকে পছন্দমত Version টি Install করা যায়।

Finally Install.wim তৈরি করার পর কোন এক জায়গায় ফাইলটি কপি করে নিন এবং Install.wim ফাইলটিতে কয়টি Image আছে তা দেখে নিন। কয়টি Image আছে তা চেক করার জন্য পছন্দমত যেকোন একটি Wim Editing Tool ব্যবহার করতে পারেন। তারপর নিচের কমান্ডটি দিয়ে একটি Batch File তৈরি করুন। Batch Fileটিও একই জায়গায় রাখুন। আপনার Install.wim File এ কয়টি Image আছে তা Batch File এ এড করতে হবে।
আমার Install.wim ফাইলটিতে চারটি Image আছে এবং আমি Batch File টিতে চারটি Image Add করেছি।Batch File এর Image সংখ্যা আর Install.wim File এর Image সংখ্যা কম বেশি হলে Command টি কাজ করবে না। প্রতিটি Image এর সাইজ সাধারণত কয়েক GB হয়ে থাকে। সাইজ খুব বড় হওয়ায় প্রতিটি Image Compressহতে একটু সময় লাগতে পারে। ক্ষেত্রে বিশেষে ঘন্টা খানেক লাগতে পারে। সব কটি Image Compress হওয়া পর্যন্ত অপেক্ষা করতে হবে এবং কোনভাবে Interruption হলে শুরু থেকে করতে হবে। তবে কাজ চলাবস্থায় অন্যান্য কাজ করা যাবে। কমান্ড সমাপ্ত হলে একই জায়গায় Install.esd তৈরি হয়ে যাবে। Run as Administrator হিসেবেBatch File টি Run করে অপেক্ষা করুন শেষ না হওয়া পর্যন্ত।
How to Use Install.esd:
Source Folder থেকে Install.wim File টি Delete করে এর পরিবর্তে Install.esd File টি Copy করে দিন। কাজ শেষ। Setup এর সময় Boot.wim প্রথমে Install.wim File কে খোঁজবে। না পেলে Install.esd File কে খোঁজে নেবে। 

Share:

Popular Posts

Powered by Blogger.

Translate

Labels

Recent Posts

Unordered List

  • Lorem ipsum dolor sit amet, consectetuer adipiscing elit.
  • Aliquam tincidunt mauris eu risus.
  • Vestibulum auctor dapibus neque.

Pages

Theme Support

Need our help to upload or customize this blogger template? Contact me with details about the theme customization you need.