MS Excel crashes when vba code runs

MS Excel crashes when vba code runs

I am having a problem with excel crashing when i run VBA code on an excel sheet.I have some code to add a formula to a range of cells as follows:Private Sub Worksheet_Change(ByVal Target As Range) Worksheets("testpage").Range("A1:A8").For

How does “this” keyword work within a function?

How does “this” keyword work within a function?

I just came across an interesting situation in JavaScript. I have a class with a method that defines several objects using object-literal notation. Inside those objects, the this pointer is being used. From the behavior of the program, I

What is the difference between visibility:hidden and display:none?

What is the difference between visibility:hidden and display:none?

The CSS rules visibility:hidden and display:none both result in the element not being visible. Are these synonyms? 1:display:none means that the tag in question will not appear on the page at all (although you can still interact with it

What is the correct way to create a single-instance application?

What is the correct way to create a single-instance application?

Using C# and WPF under .NET (rather than Windows Forms or console), what is the correct way to create an application that can only be run as a single instance?I know it has something to do with some mythical thing called a mutex, rarely can

How to make Git “forget” about a file that was tracked but is now in .gitignore?

How to make Git “forget” about a file that was tracked but is now in .gitignore?

There is a file that was being tracked by git, but now the file is on the .gitignore list.However, that file keeps showing up in git status after it's edited. How do you force git to completely forget about it? 1:.gitignore will prevent

How can I parse a JSON file with PHP?

How can I parse a JSON file with PHP?

I tried to parse a JSON file using PHP. But I am stuck now.This is the content of my JSON file:{ "John": { "status":"Wait" }, "Jennifer": { "status":"Active" }, "James": { "status":"Active", "a

Change an element's class with JavaScript

Change an element's class with JavaScript

How can I change a class of an HTML element in response to an onClick event using JavaScript? 1:Modern HTML5 Techniques for changing classesModern browsers have added classList which provides methods to make it easier to manipulate class

XDocument get XML element by the value of its name attribute

XDocument get XML element by the value of its name attribute

I have an XML result like this 0 16 firstname1 6557 Manager surname1 firstname2 6203 Director surname2

Add Github fork to existing repository

Add Github fork to existing repository

I setup an Octopress project following the given instructions (http://octopress.org/docs/setup/) which have you create a Github repository, and create a local repository on your machine. On your local machine you add a remote to the origina

The most Pythonic way of checking if a value in a dictionary is defined/has zero length

The most Pythonic way of checking if a value in a dictionary is defined/has zero length

Say I have a dictionary, and I want to check if a key is mapped to a nonempty value. One way of doing this would be the len function:mydict = {"key" : "value", "emptykey" : ""}print "True" if len(mydict["key"]) > 0 else "False" # prints t

idioms for returning multiple values in shell scripting

idioms for returning multiple values in shell scripting

Are there any idioms for returning multiple values from a bash function within a script?http://tldp.org/LDP/abs/html/assortedtips.html describes how to echo multiple values and process the results (e.g., example 35-17), but that gets tricky

android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 2

android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 2

Below is my codes and I got the android.database.CursorIndexOutOfBoundsException: Index -1 requested, with a size of 2 error. Can anyone tell me how to solve it?ContentResolver cr = getContentResolver(); Cursor cur = cr.query(ContactsContr

Favicon format GIF or ICO?

Favicon format GIF or ICO?

Why use a GIF favicon? Is that for iPhone and iPad can read it? 1:Browsers started supporting it. Also, ICO files are an old image file format for icons in Microsoft Windows. Since ICO is vendor specific, some choose to go with GIF.Not

c array - warning: format not a string literal

c array - warning: format not a string literal

I'm attempting to learn C and already I've run into an issue. I assume its trivial but I need to know it. I have written:#include #include int main() { char str_a[20]; strcpy(str_a, "Hello, world!\n"); printf(str_a);}Once I attempt

Laravel Homestead: 403 forbidden on nginx

Laravel Homestead: 403 forbidden on nginx

I just installed Laravel Homestead according to their instructions. When I open http://homestead.app:8000 I get the nginx 403 forbidden HTTP Response.I have tried setting app/storage permissions to 755, but that didn't work, so I reloaded V

Android Developer Dashboard national/regional version

Android Developer Dashboard national/regional version

As many of you may know, Google has provided us with a nice Dashboard that shows us the current distribution of active Android devices along certain characteristics, such as platform version or screen size.It would be nice to have some simi

Syntax for INSERTing into a table with no values?

Syntax for INSERTing into a table with no values?

I have a table created with the following schema:CREATE TABLE [dbo].[Visualizations]( VisualizationID int identity (1,1) NOT NULL)Since the table has no settable fields, I'm not sure how to insert a record. I tried:INSERT INTO [

what is the query to get “related tags” like in stack overflow

what is the query to get “related tags” like in stack overflow

i have 3 tables:links (id, linkName) tags (id, tagName) tagsBridge (tagID, linkID) i am trying to support showing related tags like in SOF. so if you click on tags "XYZ", right now i am showing all the links with tag "XYZ" but i also wa

Sharing audio file

Sharing audio file

I'm trying to make a button for sharing an audio file. This is not working. First I tried to send the file right from my raw folder without copying it to the card of the phone. That didn't solve my problem. The second thing I tried, is savi

On the iPhone, is it possible to find out which WIFI network we are connected to?

On the iPhone, is it possible to find out which WIFI network we are connected to?

If yes, can we also get additional information about the network configuration?One useful way to do this could be getting the SSID of the current network. Is there an API to do that?Update: I found a similar question here:Can the iPhone SDK

(MySql) Why NOT NULL add to primary key field?

(MySql) Why NOT NULL add to primary key field?

Why NOT NULL add to primary key field?(primary key is already not null+unique)Example for NOT NULL id field:create table student( id int(11) AUTO_INCREMENT NOT NULL, name varchar(255), PRIMARY KEY(id))Instead Just:create table student( id i

Free web service to determine IP address zip code [closed]

Free web service to determine IP address zip code [closed]

Does anyone know of a free web service to determine the zip code of an IP address? 1:MaxMind GeoLite Cityhttp://www.maxmind.com/app/geolitecity 2:I realize this question is old, but this may still help other people. I found a free /

Firestore new database - How do I backup

Firestore new database - How do I backup

Does the google firestore database service provides a backup?If so, how do I backup the database and how do I restore in case of an error? 1:https://www.npmjs.com/package/firestore-backupIs a tool that has been created to do just this.(I

How do I simulate a slow Meteor publication?

How do I simulate a slow Meteor publication?

I'm trying to simulate a publication doing a bunch of work and taking a long time to return a cursor.My publish method has a forced sleep (using a future), but the app always displays onlyLoading...Here's the publication:Meteor.publish('peo

Can we make Restful webservice stateful

Can we make Restful webservice stateful

I have been reading about about Restful webservices being Stateless.I can also see that most of Soap based webservices are also stateless and can be made stateful if needed and making them stateful will depend on implementation. So if a soa