Search This Blog

Monday, January 9, 2012

Macros Programming in Excel Sheet 2010


Macros Programming in Excel Sheet 2010
1)    Start Excel Sheet 2010
2)    Click on View tab




3)    Now click on dropdown Macros and select Record Macros in dropdown menu



4)    Press ok in the new window opened



5)    Now again pull down dropdown menu of Macros and click on Stop Recording
 
6)    Now select View Macros in dropdown menu of Macros.

7)    You will get a window showing all the macros like this

8)    Select your Macro as in our case its Macro1 and now click on edit.
9)    You will get a new window as shown in figure below
This window is the visual basic programming interface
This Interface show different components as project explorer, property window, code window.
Out of all this most important for our sake is code window highlighted in red color.


10)                      It shows a macro “Macro1” underlined in red color. It’s the macro that we have recorded in step 4.
11)                      Now delete everything except
Sub Macro1
End Sub

12)                      Now put your code in between these two lines

13)                      Press Alt+F11 to go back to the excel sheet
(You can always switch between programming interface and excel sheet with Alt+F11)
14)                      Now again Select View Macros from the Macros drop down menu and just click on run after selecting your Macro from the View Macro window to see the effect of your work.

Monday, October 17, 2011

Java.Security.AccessControlException ERROR IN RMI PROGRAMMING

These errors are related to the security policy of java
Java has it's own security manager that takes care of all unprivileged connection accesses.
To resolve these kinds of errors ,you need to create a new security policy 



Eg. For allowing connections to ip 127.0.0.1 at pot 1099 and 1024

grant{
permission java.net.SocketPermission "localhost:1099", "connect, resolve";
permission java.net.SocketPermission "localhost:1024-", "connect, resolve";
permission java.net.SocketPermission "localhost:1024-", "accept, resolve";

permission java.net.SocketPermission "localhost:1099-", "accept, resolve";
};


Save the content in a file called policy.txt and now run your server as



java -Djava.security.policy=policy.txt Server


The policy file must be saved in same folder where you have saved Server.java